2016-07-01 07:00:53 +00:00
|
|
|
# XXX nostring
|
2016-06-14 03:47:19 +00:00
|
|
|
if not contains string (builtin -n)
|
2016-07-02 18:40:22 +00:00
|
|
|
function string
|
|
|
|
if not set -q __is_launched_without_string
|
|
|
|
if status --is-interactive
|
|
|
|
# We've been autoloaded after fish < 2.3.0 upgraded to >= 2.3.1 - no string builtin
|
|
|
|
set_color --bold >&2
|
|
|
|
echo "Fish has been upgraded, and the scripts on your system are not compatible" >&2
|
|
|
|
echo "with this prior instance of fish. You can probably run:" >&2
|
|
|
|
set_color green >&2
|
|
|
|
echo -e "\n exec fish" >&2
|
|
|
|
set_color normal >&2
|
|
|
|
echo "… to replace this process with a new one in-place." >&2
|
|
|
|
set -g __is_launched_without_string 1
|
|
|
|
end
|
|
|
|
end
|
2017-08-05 01:02:24 +00:00
|
|
|
set -p PATH $__fish_bin_dir
|
2016-07-02 18:40:22 +00:00
|
|
|
set string_cmd string \'$argv\'
|
|
|
|
|
|
|
|
if fish -c 'contains string (builtin -n)'
|
|
|
|
fish -c "$string_cmd"
|
|
|
|
else
|
|
|
|
return 127
|
|
|
|
end
|
|
|
|
end
|
2016-06-14 03:47:19 +00:00
|
|
|
end
|