mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
string.fish: use if/else. Reindent.
This commit is contained in:
parent
e597df70d7
commit
f966248f16
1 changed files with 23 additions and 22 deletions
|
@ -14,12 +14,13 @@ if not contains string (builtin -n)
|
|||
set -g __is_launched_without_string 1
|
||||
end
|
||||
end
|
||||
# We hope that in $__fish_bin_path is a newer fish that can do `string` for us.
|
||||
|
||||
set PATH $__fish_bin_dir $PATH
|
||||
set string_cmd string \'$argv\'
|
||||
fish -c 'contains string (builtin -n)'
|
||||
and fish -c "$string_cmd"
|
||||
or return 127
|
||||
|
||||
if fish -c 'contains string (builtin -n)'
|
||||
fish -c "$string_cmd"
|
||||
else
|
||||
return 127
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue