From b8b062eb84040b531a2641972107277ae41f70f1 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Thu, 25 Jan 2024 18:37:11 +0100 Subject: [PATCH] docs: Update qmark-noglob status Note: The version number needs to be adjusted --- CHANGELOG.rst | 7 +++++++ doc_src/language.rst | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b2c9c592e..ad57e1599 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,13 @@ We have tried to keep these to a minimum, but in some cases it is unavoidable. - ``functions --handlers`` will now list handlers in a different order. Now it is definition order, first to last, where before it was last to first. This was never specifically defined, and we recommend not relying on a specific order (:issue:`9944`). +- The ``qmark-noglob`` feature flag, introduced in fish 3.0, is now turned on by default. That means ``?`` will no longer act as a single-character glob. + You can, for the time being, turn it back on by adding ``no-qmark-noglob`` to :envvar:`fish_features` and restarting fish:: + + set -Ua fish_features no-qmark-noglob + + The flag will eventually be made read-only, making it impossible to turn off. + Notable improvements and fixes ------------------------------ diff --git a/doc_src/language.rst b/doc_src/language.rst index 516cf37bd..0adc7218d 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1984,14 +1984,14 @@ 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 + qmark-noglob on 3.0 ? no longer globs regex-easyesc on 3.1 string replace -r needs fewer \\'s ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character Here is what they mean: - ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored. -- ``qmark-noglob`` was also introduced in fish 3.0. It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``. +- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 3.8). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``. - ``regex-easyesc`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere. - ``ampersand-nobg-in-token`` was introduced in fish 3.4. It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.