From dabd05f2e36c07a9bd9b2ac8b103e9a4fa9fba10 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 30 Dec 2018 19:24:03 +0100 Subject: [PATCH] Remove string fallback function We already have a fallback here, and upgrading from 2.3.0 to 3.X will be rare. This costs every shell on every start. See #5279. --- share/functions/string.fish | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 share/functions/string.fish diff --git a/share/functions/string.fish b/share/functions/string.fish deleted file mode 100644 index 72cb67a62..000000000 --- a/share/functions/string.fish +++ /dev/null @@ -1,26 +0,0 @@ -# XXX nostring -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 >&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 - set -p PATH $__fish_bin_dir - set string_cmd string \'$argv\' - - if fish -c 'contains string (builtin -n)' - fish -c "$string_cmd" - else - return 127 - end - end -end