mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Check if fish -c string will work first.
This commit is contained in:
parent
c79e9c7d4e
commit
e597df70d7
1 changed files with 5 additions and 3 deletions
|
@ -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)'
|
||||||
|
and fish -c "$string_cmd"
|
||||||
|
or return 127
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue