fix some formatting in my fishfuncs

This commit is contained in:
Ben Harris 2018-11-28 11:32:25 -05:00
parent f5bb310554
commit 3c8cac9765
12 changed files with 36 additions and 31 deletions

View File

@ -1,4 +0,0 @@
function 0x0
curl -F"file=@"$argv[1] https://0x0.tilde.team
end

View File

@ -1,7 +1,8 @@
function cat
if type -q bat >/dev/null
bat $argv
else
command cat $argv
end
if type -q bat >/dev/null
bat $argv
else
command cat $argv
end
end

View File

@ -1,4 +1,4 @@
# Defined in /tmp/fish.IQuG4C/e.fish @ line 1
function e
exa -al --git --group-directories-first $argv
end

View File

@ -3,3 +3,4 @@ function fish_greeting
/bin/cat /var/run/motd
end
end

View File

@ -1,17 +1,16 @@
function fish_right_prompt
if is_git
if is_git_dirty
set_color --underline
end
if is_git_dirty
set_color --underline
end
set_color yellow
if is_git_ahead
if is_git_ahead
echo -n '^'
else
echo -n '='
end
echo -n ' '
else
echo -n '='
end
echo -n (git_branch)
set_color normal

View File

@ -1,5 +1,6 @@
function git_branch
if is_git
echo (git rev-parse --abbrev-ref HEAD ^/dev/null)
end
if is_git
echo (git rev-parse --abbrev-ref HEAD ^/dev/null)
end
end

View File

@ -4,9 +4,10 @@ function is_git_dirty
is_git; or return 1
if git diff-files --quiet --ignore-submodules
or git diff-index --cached --quiet --ignore-submodules HEAD --
and git diff-index --cached --quiet --ignore-submodules HEAD --
return 1
else
# we're dirty
return 0
end
end

View File

@ -2,3 +2,4 @@
function l
ls -lah --group-directories-first $argv
end

View File

@ -1,4 +1,7 @@
function longtlds
wget -qO - http://data.iana.org/TLD/tlds-alpha-by-domain.txt | tail -n+2 | awk '{print length, $0;}' | sort -n $argv
wget -qO - http://data.iana.org/TLD/tlds-alpha-by-domain.txt \
| tail -n+2 \
| awk '{print length, $0;}' \
| sort -n $argv
end

View File

@ -1,3 +1,4 @@
function sysu
systemctl --user $argv
end

View File

@ -4,3 +4,4 @@ function vz
vim $file
end
end

View File

@ -1,10 +1,10 @@
function wildcard-cert
sudo certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /root/.secrets/cloudflare.ini \
--server https://acme-v02.api.letsencrypt.org/directory \
--preferred-challenge dns-01 \
--cert-name $argv[1] \
-d $argv[1] \
-d \*.$argv[1]
sudo certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /root/.secrets/cloudflare.ini \
--server https://acme-v02.api.letsencrypt.org/directory \
--preferred-challenge dns-01 \
--cert-name $argv[1] \
-d $argv[1] \
-d \*.$argv[1]
end