mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
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:
parent
ccd62ff44b
commit
43515e1298
1 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue