Check if fish -c string will work first.

This commit is contained in:
Aaron Gyes 2016-07-02 11:05:04 -07:00
parent c79e9c7d4e
commit e597df70d7

View file

@ -16,8 +16,10 @@ if not contains string (builtin -n)
end end
# We hope that in $__fish_bin_path is a newer fish that can do `string` for us. # We hope that in $__fish_bin_path is a newer fish that can do `string` for us.
set fish_user_paths $__fish_bin_dir $fish_user_paths set PATH $__fish_bin_dir $PATH
set string_cmd string \'$argv\' set string_cmd string \'$argv\'
fish -c "$string_cmd" fish -c 'contains string (builtin -n)'
end and fish -c "$string_cmd"
or return 127
end
end end