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.
This commit is contained in:
Aaron Gyes 2016-08-07 15:18:12 -07:00
parent ccd62ff44b
commit 43515e1298

View file

@ -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