From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24524 invoked by alias); 3 Feb 2015 14:08:04 -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: 19799 Received: (qmail 27994 invoked from network); 3 Feb 2015 14:08:01 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=donmez.ws; s=www; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=pXbFWS4BSKVgTyhmerHQehgi7gSHjJ1ad8bKgHkp1m4=; b=iivdopyo+3oMZitzs/zzXs7Mvfh8eHGDDDZBXPb5jlW6GQb9Aym3cmMERK2vfk8Ofl wC1sXHwnbNK2C0p3nuwd/FlJnrenNqV8BbbxKe0R77mUVWF3W+jXBg2kbfKIU0HvnoNv YO7vsGprNawMhMR7n9YXjsxMFWa+lKWl/Qtys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=pXbFWS4BSKVgTyhmerHQehgi7gSHjJ1ad8bKgHkp1m4=; b=CV7NTJRkdQjToo2Y8t0sUFtrpL17vx6w4vz6+Bymm+KlsIQO2XrfuHYBBRPXlw5RP5 rRL0UTlBxhDeHMrmCa4UpcnOFF7ZekBBDYHRgLPJ5BvYWwc+qr5EHtTHJ3SdMhslJg69 uwv6HKLXPh6IH/4NDgsF2WHqaOYSfly86KAdmyZcPwnEW5myzpr1NL5rFLkXD80PdhLV bLD1Hw2WgSwrwr2sjO7pBieSzkMzWGx7z3SW4hxspGPwMR5N3sF4jz2cBX+HtIbjt9Ck w8MZ4EqCYEHjkqN/qyXbHmy1qzBDyCfZ+OXNRs+iXY7SBPPOFcN2VdV9SK1fRXoSXcG9 hMyw== X-Gm-Message-State: ALoCoQnZZNLRLLX+rBkjud6eXosC0t91yI+SfFnuuYXRQ2S07vKT9MhLb/iYv73tdTQIoIOAEPWh X-Received: by 10.112.25.104 with SMTP id b8mr24450992lbg.69.1422972478329; Tue, 03 Feb 2015 06:07:58 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20150203140242.382b2e64@pwslap01u.europe.root.pri> References: <20150203121349.53f135fd@pwslap01u.europe.root.pri> <20150203124708.443404f0@pwslap01u.europe.root.pri> <20150203140242.382b2e64@pwslap01u.europe.root.pri> From: =?UTF-8?B?xLBzbWFpbCBEw7ZubWV6?= Date: Tue, 3 Feb 2015 16:07:37 +0200 Message-ID: Subject: Re: Hiding command from history To: Peter Stephenson Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, On Tue, Feb 3, 2015 at 4:02 PM, Peter Stephenson wrote: > 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! >> >> 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} ]]; } That works as expected, thanks again!