Re: history expansion

Mikael Magnusson <[email protected]> Sun, 12 Jul 2026 20:27:24 +0200
Newsgroups gmane.comp.shells.zsh.user
Message-ID <CAHYJk3RVVbVxRFaNNyVMM4ywfY5de2PHHoBeCKqHx9tinh+9MA@mail.gmail.com>
On Sun, Jul 12, 2026 at 7:15=E2=80=AFPM Vincent Lefevre <[email protected]=
> wrote:
>
> On 2026-07-12 09:36:36 -0400, Mark J. Reed wrote:
> > I use history substitution all the time. I'm occasionally annoyed by th=
e
> > need to extra-quote exclamation points, but not enough to give up the
> > feature, which you can always turn off with *unsetopt banghist*.
>
> I was more thinking about why it was not turned off by default
> (principle of least surprise for most users).

Changing the default is the most surprise, there are certainly many
options I would change the default value of if I was allowed to :).

Personally I use this, in the rare cases I do want banghist, but I
also don't want to be annoyed by having to quote exclamation points,
 setopt banghist
histchars=3D$'\2\6#' # ^B^F#
bindkey "^F" self-insert
bindkey "^B" self-insert

since I never actually use ^B/^F for navigation.

--=20
Mikael Magnusson