mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
simplify previous change to the _ script
There's no need for a local var or echo in a subcommand. Also, fix the formatting to match the style guide.
This commit is contained in:
parent
7e0e745958
commit
e46978fedb
|
@ -1,14 +1,13 @@
|
|||
#
|
||||
# Alias for gettext (or a fallback if gettext isn't installed)
|
||||
# Alias for gettext or a fallback if gettext isn't installed.
|
||||
#
|
||||
set -l gettext_path (command -v gettext)
|
||||
if test -x (echo $gettext_path)
|
||||
function _ --description "Alias for the gettext command"
|
||||
command gettext fish $argv
|
||||
end
|
||||
if command -s gettext >/dev/null
|
||||
function _ --description "Alias for the gettext command"
|
||||
command gettext fish $argv
|
||||
end
|
||||
else
|
||||
function _ --description "Fallback alias for the gettext command"
|
||||
echo -n $argv
|
||||
end
|
||||
function _ --description "Fallback alias for the gettext command"
|
||||
echo -n $argv
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user