Files
fish-shell/share/functions/string.fish
Aaron Gyes dfb4998778 Work around absent `string' in old fishies upgrading.
Improves experience during upgrades, accidentally running
an old fish with a new environment. No errors just from
printing a prompt. Fixes #3057.

Print helpful notice also when launching mismatched fish.

Autoloadable string.fish -- only create function if not builtin.
2016-06-26 16:25:41 -07:00

17 lines
610 B
Fish

if not contains string (builtin -n)
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
echo "Fish has been upgraded, and the scripts on your system are not compatible"
echo "with this prior instance of fish. You can probably run:"
set_color green
echo "\n exec fish"
set_color normal
echo "… to replace this process with a new one in-place."
end
end
end
end