2

So it is possible to permanently disable the functionality of ?, making \? unnecessary, by enabling the qmark-noglob feature flag.

I would like to do the same thing for &, as I never use it for what it is supposed to do, but reasonably often work with urls that include it.

There is probably no flag for that (as that is not behavior where fish differs from bash), but maybe you know how that could be done. (I tried setting an alias, but that doesn't work)

Basically I want to save myself having to escape the & by typing \& all the time. Thanks a lot!

1
  • 1
    Have you considered quotes e.g. 'url' Dec 6, 2020 at 10:41

1 Answer 1

2

Fish does not have an option to disable this. The reason there is currently an option to disable ? is because the ? glob is deprecated and will be entirely removed in future. There's no such plan for &.

What you can do is add a binding that inserts \& when you press &. Something like

bind \& 'commandline -i "\&"'

Of course this means you'd have to figure out how to insert an actual & if you do want to use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.