From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4552 invoked by alias); 3 Feb 2015 14:02:49 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19798 Received: (qmail 4922 invoked from network); 3 Feb 2015 14:02:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f126d000001e9a-92-54d0d47252cc Date: Tue, 03 Feb 2015 14:02:42 +0000 From: Peter Stephenson To: Zsh Users Subject: Re: Hiding command from history Message-id: <20150203140242.382b2e64@pwslap01u.europe.root.pri> In-reply-to: References: <20150203121349.53f135fd@pwslap01u.europe.root.pri> <20150203124708.443404f0@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Nd2iKxdCDJY+NrbYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Ms4evMBecJu9omf3BbYGxha2LkZODgkBE4kZ376xQthiEhfu rQeLCwksZZT4scumi5ELxGaSWPimASzBIqAq8fvnPHYQm03AUGLqptmMILaIgKLEmV/fmEBs YQENiVMrV4PV8wrYS5xaPgFsAadAsMSnv+9YIIZOZpZY9e4sWBG/gL7E1b+fmCCusJeYeeUM I0SzoMSPyfdYQGxmAXWJSfMWMUPY2hJP3l1gncAoMAtJ2SwkZbOQlC1gZF7FKJpamlxQnJSe a6hXnJhbXJqXrpecn7uJERKEX3YwLj5mdYhRgINRiYd3hdGFECHWxLLiytxDjBIczEoivOnL gUK8KYmVValF+fFFpTmpxYcYmTg4pRoYVdn9i439v17i2H+wILyWSVBYeHrBkkUMn+b/vbRC +AP/RP/JlmHrFnYkbtdk91n3Pa7odtWusFulWoGmn4/5P8/Z2R+deb/+bLUTo03U13mHl15k jla6Uf1ru8b0//Nv3d2669OEhaEuNWw7ny7YPOdBQdWkWzpMr5c5ZO9Qm2l7b9WTv7+7FJVY ijMSDbWYi4oTAaV1hC0gAgAA On Tue, 3 Feb 2015 15:49:20 +0200 =C4=B0smail D=C3=B6nmez wrote: > On Tue, Feb 3, 2015 at 3:06 PM, =C4=B0smail D=C3=B6nmez wrote: > > On Tue, Feb 3, 2015 at 2:47 PM, Peter Stephenson > > wrote: > >> and indeed there's no reason I can think of why you couldn't simply > >> define > >> > >> zshaddhistory() { [[ $1 =3D ${~HISTORY_IGNORE} ]] && return 1; } > > > > This is quite nice. Thanks! >=20 > 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 !=3D ${~HISTORY_IGNORE} ]]; } The old one reflected the status of the [[ ... ]] if it failed, but the status of that is actually all we need as long as we reverse it. pws