From 1662945d9cefeed851888cd561050d70c5bc09cf Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 30 Mar 2019 17:43:55 -0400 Subject: don't add to fish_user_paths if it's already in there --- fish/.config/fish/config.fish | 2 +- fish/.config/fish/functions/insult.fish | 3 +++ fish/insults.txt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 fish/.config/fish/functions/insult.fish (limited to 'fish') diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 7c8372c..a04be7a 100755 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -18,7 +18,7 @@ end set user_paths ~/bin /usr/local/go/bin ~/.yarn/bin $GOPATH/bin ~/.local/bin ~/.cargo/bin /snap/bin ~/.fzf/bin for path in $user_paths - if test -d $path + if test -d $path; and not echo $fish_user_paths | grep -q "$path" set -x fish_user_paths $fish_user_paths $path end end diff --git a/fish/.config/fish/functions/insult.fish b/fish/.config/fish/functions/insult.fish new file mode 100644 index 0000000..60e3fb5 --- /dev/null +++ b/fish/.config/fish/functions/insult.fish @@ -0,0 +1,3 @@ +function insult + shuf -n1 ~/insults.txt +end diff --git a/fish/insults.txt b/fish/insults.txt index efabbcd..03caa22 100644 --- a/fish/insults.txt +++ b/fish/insults.txt @@ -45,3 +45,4 @@ Where did you learn to type? Are you on drugs? You type like I drive. Do you think like you type? +ur cute -- cgit 1.4.1