From 43515e12985fe3839d0f3498693b2b5266eb2f7c Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sun, 7 Aug 2016 15:18:12 -0700 Subject: [PATCH] Use `command -v` instead of `which` in _.fish I didn't know that there was any which usage outside of type -a in our functions, until I grepped and noticed this. --- share/functions/_.fish | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/share/functions/_.fish b/share/functions/_.fish index c5a180890..fcfd75db5 100644 --- a/share/functions/_.fish +++ b/share/functions/_.fish @@ -1,15 +1,13 @@ - # # Alias for gettext (or a fallback if gettext isn't installed) # - -set -l path (which gettext ^/dev/null) -if test -x (echo $path) +set -l gettext_path (command -v gettext) +if test -e (echo -n $gettext_path) function _ --description "Alias for the gettext command" - gettext fish $argv + command gettext fish $argv end else - function _ --description "Alias for the gettext command" + function _ --description "Fallback alias for the gettext command" echo -n $argv end end