mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user