Use fish -c string ... as the string fallback.

We can again drop the prompt_pwd check.
This commit is contained in:
Aaron Gyes
2016-07-01 00:00:53 -07:00
parent 84b08a4fe3
commit 431589a16a
3 changed files with 7 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
# XXX nostring
if not contains string (builtin -n)
# XXX nostring
function string
if not set -q __is_launched_without_string
if status --is-interactive
@@ -14,6 +14,10 @@ if not contains string (builtin -n)
set -g __is_launched_without_string 1
end
end
return 127
# 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 string_cmd string \'$argv\'
fish -c "$string_cmd"
end
end