Skip to content

Turn on more feature flags by default for 3.5 #8857

@faho

Description

@faho

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions