-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
It's another round of turning on feature flags.
We could:
- Turn on regex-easyesc
- Turn on ampersand-nobg-in-token
- Freeze stderr-nocaret to on so it can no longer be turned off
As a reminder, here's what these do:
-
regex-easyesc removes an additional superfluous round of escaping in the replacement expression for
string replace -r. This makes using backslashes there much simpler. As an example seefish-shell/share/functions/__fish_pwd.fish
Lines 2 to 7 in a770ff1
if status test-feature regex-easyesc string replace -r '^/cygdrive/(.)?' '\U$1:' -- $PWD else # TODO: Remove this once regex-easyesc becomes the default string replace -r '^/cygdrive/(.)?' '\\\U$1:' -- $PWD end -
ampersand-nobg-in-token makes
&inside a word not refer to backgrounding. Soecho foo&barprints "foo&bar" instead of backgroundingecho fooand executingbar. This makes working with URLs easier. To be clear:echo foo& barandecho foo &barremain the same,&refers to backgrounding here. I don't foresee many people using&without spaces around it in anger. -
stderr-nocaret removes the
^redirection, which can just be replaced with2>. This was introduced in fish 3.0, and enabled by default since fish 3.3 a year ago. I believe at this point things should have moved on from stderr-nocaret, and freezing it means there are no longer two script dialects that can cause issues.
regex-easyesc was introduced in fish 3.1. It's a fix for something that has been brought up a few times. Unfortunately it's not great to find offending code, but on the other hand there's no indication that it would improve much if we delay turning it on further.
Any ideas?