Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: widget accept-no-history
- X-seq: zsh-users 29196
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- Cc: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: widget accept-no-history
- Date: Thu, 24 Aug 2023 10:47:33 -0700
- Archived-at: <https://zsh.org/users/29196>
- In-reply-to: <CAP+y1xAPkaACMYJr93qibBKSmPYW2D3MYShWwA9xdKz=ejd7NQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAP+y1xCDmEVdVgs29L-pWYEdwtKieSFhyuWBBRd9=zQb=Y2Csg@mail.gmail.com> <CAH+w=7ZrFOsQv+HTAzMxW+XeyRdJ-EsbuD3MzBSEeGawrpP8Hw@mail.gmail.com> <CAP+y1xAPkaACMYJr93qibBKSmPYW2D3MYShWwA9xdKz=ejd7NQ@mail.gmail.com>
On Thu, Aug 24, 2023 at 7:01 AM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> I see, I wasn't aware of the zshaddhistory hook
Just one quick addition:
>> zshaddhistory() {
>> [[ -o hist_ignore_space ]] && return 2
>> }
That needs to be
zshaddhistory() {
[[ -o hist_ignore_space ]] && return 2
return 0
}
Otherwise the failed [[ -o ]] test will cause a return of 1, which
will cause the line to be skipped entirely.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author