about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2018-11-28 11:32:25 -0500
committerBen Harris <ben@tilde.team>2018-11-28 11:32:25 -0500
commit3c8cac976541a084b321d4f5c8589663d1fabcf4 (patch)
tree5f13e05b958de2125bbcc3699391c44cf6d2c83c
parentf5bb310554e523ef894bdc94e70659aa62c080f2 (diff)
fix some formatting in my fishfuncs
-rw-r--r--fish/.config/fish/functions/0x0.fish4
-rw-r--r--fish/.config/fish/functions/cat.fish11
-rw-r--r--fish/.config/fish/functions/e.fish2
-rw-r--r--fish/.config/fish/functions/fish_greeting.fish1
-rw-r--r--fish/.config/fish/functions/fish_right_prompt.fish15
-rw-r--r--fish/.config/fish/functions/git_branch.fish7
-rw-r--r--fish/.config/fish/functions/is_git_dirty.fish3
-rw-r--r--fish/.config/fish/functions/l.fish1
-rw-r--r--fish/.config/fish/functions/longtlds.fish5
-rw-r--r--fish/.config/fish/functions/sysu.fish1
-rw-r--r--fish/.config/fish/functions/vz.fish1
-rw-r--r--fish/.config/fish/functions/wildcard-cert.fish16
12 files changed, 36 insertions, 31 deletions
diff --git a/fish/.config/fish/functions/0x0.fish b/fish/.config/fish/functions/0x0.fish
deleted file mode 100644
index fdba590..0000000
--- a/fish/.config/fish/functions/0x0.fish
+++ /dev/null
@@ -1,4 +0,0 @@
-function 0x0
-    curl -F"file=@"$argv[1] https://0x0.tilde.team
-end
-
diff --git a/fish/.config/fish/functions/cat.fish b/fish/.config/fish/functions/cat.fish
index 47f06e3..4420647 100644
--- a/fish/.config/fish/functions/cat.fish
+++ b/fish/.config/fish/functions/cat.fish
@@ -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
+
diff --git a/fish/.config/fish/functions/e.fish b/fish/.config/fish/functions/e.fish
index 764bd33..95d46e7 100644
--- a/fish/.config/fish/functions/e.fish
+++ b/fish/.config/fish/functions/e.fish
@@ -1,4 +1,4 @@
-# Defined in /tmp/fish.IQuG4C/e.fish @ line 1
 function e
 	exa -al --git --group-directories-first $argv
 end
+
diff --git a/fish/.config/fish/functions/fish_greeting.fish b/fish/.config/fish/functions/fish_greeting.fish
index b2b60e1..ed2f6f7 100644
--- a/fish/.config/fish/functions/fish_greeting.fish
+++ b/fish/.config/fish/functions/fish_greeting.fish
@@ -3,3 +3,4 @@ function fish_greeting
         /bin/cat /var/run/motd
     end
 end
+
diff --git a/fish/.config/fish/functions/fish_right_prompt.fish b/fish/.config/fish/functions/fish_right_prompt.fish
index 50a5f13..1f5b4c5 100644
--- a/fish/.config/fish/functions/fish_right_prompt.fish
+++ b/fish/.config/fish/functions/fish_right_prompt.fish
@@ -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
diff --git a/fish/.config/fish/functions/git_branch.fish b/fish/.config/fish/functions/git_branch.fish
index e3507d0..af82dea 100644
--- a/fish/.config/fish/functions/git_branch.fish
+++ b/fish/.config/fish/functions/git_branch.fish
@@ -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
+
diff --git a/fish/.config/fish/functions/is_git_dirty.fish b/fish/.config/fish/functions/is_git_dirty.fish
index 09a409f..b497d22 100644
--- a/fish/.config/fish/functions/is_git_dirty.fish
+++ b/fish/.config/fish/functions/is_git_dirty.fish
@@ -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
diff --git a/fish/.config/fish/functions/l.fish b/fish/.config/fish/functions/l.fish
index 2368c38..c8e95cb 100644
--- a/fish/.config/fish/functions/l.fish
+++ b/fish/.config/fish/functions/l.fish
@@ -2,3 +2,4 @@
 function l
 	ls -lah --group-directories-first $argv
 end
+
diff --git a/fish/.config/fish/functions/longtlds.fish b/fish/.config/fish/functions/longtlds.fish
index b404702..231b639 100644
--- a/fish/.config/fish/functions/longtlds.fish
+++ b/fish/.config/fish/functions/longtlds.fish
@@ -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
 
diff --git a/fish/.config/fish/functions/sysu.fish b/fish/.config/fish/functions/sysu.fish
index 8a1fe68..37f2726 100644
--- a/fish/.config/fish/functions/sysu.fish
+++ b/fish/.config/fish/functions/sysu.fish
@@ -1,3 +1,4 @@
 function sysu
 	systemctl --user $argv
 end
+
diff --git a/fish/.config/fish/functions/vz.fish b/fish/.config/fish/functions/vz.fish
index e2f30f3..0c353a1 100644
--- a/fish/.config/fish/functions/vz.fish
+++ b/fish/.config/fish/functions/vz.fish
@@ -4,3 +4,4 @@ function vz
 		vim $file
 	end
 end
+
diff --git a/fish/.config/fish/functions/wildcard-cert.fish b/fish/.config/fish/functions/wildcard-cert.fish
index f8d5fcb..c18038d 100644
--- a/fish/.config/fish/functions/wildcard-cert.fish
+++ b/fish/.config/fish/functions/wildcard-cert.fish
@@ -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