Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: history expansion



On Sun, Jul 12, 2026 at 7:15 PM Vincent Lefevre <vincent@xxxxxxxxxx> 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 the
> > 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=$'\2\6#' # ^B^F#
bindkey "^F" self-insert
bindkey "^B" self-insert

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

-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author