string.fish: use if/else. Reindent.

This commit is contained in:
Aaron Gyes 2016-07-02 11:40:22 -07:00
parent e597df70d7
commit f966248f16

View file

@ -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