string-replace-fewer-backslashes -> regex-easyesc

This shortens a very long feature name.

See discussion in #5805
This commit is contained in:
Aaron Gyes 2019-08-13 22:28:17 -07:00
parent ce178fd6fd
commit edc8d5d7a3
3 changed files with 3 additions and 4 deletions

View file

@ -26,7 +26,7 @@ function fish_clipboard_paste
#
# This eases pasting non-code (e.g. markdown or git commitishes).
if __fish_commandline_is_singlequoted
if status test-feature string-replace-fewer-backslashes
if status test-feature regex-easyesc
set data (string replace -ra "(['\\\])" '\\\\$1' -- $data)
else
set data (string replace -ra "(['\\\])" '\\\\\\\$1' -- $data)

View file

@ -1714,7 +1714,7 @@ You can see the current list of features via ``status features``::
> status features
stderr-nocaret on 3.0 ^ no longer redirects stderr
qmark-noglob off 3.0 ? no longer globs
string-replace-fewer-backslashes off 3.1 string replace -r needs fewer backslashes in the replacement
regex-easyesc off 3.1 string replace -r needs fewer \\'s
There are two breaking changes in fish 3.0: caret ``^`` no longer redirects stderr, and question mark ``?`` is no longer a glob.

View file

@ -13,8 +13,7 @@ features_t &mutable_fish_features() { return global_features; }
const features_t::metadata_t features_t::metadata[features_t::flag_count] = {
{stderr_nocaret, L"stderr-nocaret", L"3.0", L"^ no longer redirects stderr"},
{qmark_noglob, L"qmark-noglob", L"3.0", L"? no longer globs"},
{string_replace_backslash, L"string-replace-fewer-backslashes", L"3.1",
L"string replace -r needs fewer backslashes in the replacement"},
{string_replace_backslash, L"regex-easyesc", L"3.1", L"string replace -r needs fewer \\'s"},
};
const struct features_t::metadata_t *features_t::metadata_for(const wchar_t *name) {