Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on more feature flags by default for 3.5 #8857

Closed
faho opened this issue Apr 4, 2022 · 1 comment
Closed

Turn on more feature flags by default for 3.5 #8857

faho opened this issue Apr 4, 2022 · 1 comment

Comments

@faho
Copy link
Member

faho commented Apr 4, 2022

It's another round of turning on feature flags.

We could:

  1. Turn on regex-easyesc
  2. Turn on ampersand-nobg-in-token
  3. 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 see

    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. So echo foo&bar prints "foo&bar" instead of backgrounding echo foo and executing bar. This makes working with URLs easier. To be clear: echo foo& bar and echo foo &bar remain 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 with 2>. 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?

@faho faho added this to the fish 3.5.0 milestone Apr 4, 2022
faho added a commit to faho/fish-shell that referenced this issue Apr 8, 2022
This was introduced in fish 3.1. It removes a superfluous round of
escaping in the replacement for `string replace -r`.

Part of fish-shell#8857.
@faho faho mentioned this issue Apr 8, 2022
3 tasks
faho added a commit that referenced this issue Apr 15, 2022
This was introduced in fish 3.1. It removes a superfluous round of
escaping in the replacement for `string replace -r`.

Part of #8857.
@faho
Copy link
Member Author

faho commented Apr 15, 2022

Okay, done now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant