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

Re: Hiding command from history



Hi,

On Tue, Feb 3, 2015 at 4:02 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Tue, 3 Feb 2015 15:49:20 +0200
> İsmail Dönmez <ismail@xxxxxxxxx> wrote:
>
>> On Tue, Feb 3, 2015 at 3:06 PM, İsmail Dönmez <ismail@xxxxxxxxx> wrote:
>> > On Tue, Feb 3, 2015 at 2:47 PM, Peter Stephenson
>> > <p.stephenson@xxxxxxxxxxx> wrote:
>> >> and indeed there's no reason I can think of why you couldn't simply
>> >> define
>> >>
>> >> zshaddhistory() { [[ $1 = ${~HISTORY_IGNORE} ]] && return 1; }
>> >
>> > This is quite nice. Thanks!
>>
>> Talked too early it seems. When I add this line to my ~/.zshrc then
>> history file is never updated when I exit the shell. Removing this
>> line fixes the problem. Any ideas why?
>
> Sorry, I was careless with status.  Which just goes to show...
>
> See if the following works, which I think it does...
>
> zshaddhistory() { [[ $1 != ${~HISTORY_IGNORE} ]]; }

That works as expected, thanks again!



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