mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +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
|
set -g __is_launched_without_string 1
|
||||||
end
|
end
|
||||||
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 PATH $__fish_bin_dir $PATH
|
||||||
set string_cmd string \'$argv\'
|
set string_cmd string \'$argv\'
|
||||||
fish -c 'contains string (builtin -n)'
|
|
||||||
and fish -c "$string_cmd"
|
if fish -c 'contains string (builtin -n)'
|
||||||
or return 127
|
fish -c "$string_cmd"
|
||||||
|
else
|
||||||
|
return 127
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue