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

Re: widget accept-no-history



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