From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6980 invoked by alias); 26 Aug 2010 08:30:54 -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: 15334 Received: (qmail 19887 invoked from network); 26 Aug 2010 08:30:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at biskalar.de does not designate permitted sender hosts) References: <20100825192608.GG11622@trustfood.org> In-Reply-To: <20100825192608.GG11622@trustfood.org> Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii Message-Id: Content-Transfer-Encoding: quoted-printable Cc: zsh-users@zsh.org From: Sebastian Stark Subject: Re: do not write certain commands to history file Date: Thu, 26 Aug 2010 10:10:35 +0200 To: Eric Smith X-Mailer: Apple Mail (2.1081) Am 25.08.2010 um 21:26 schrieb Eric Smith: > Oh zsh seers, >=20 > What is the way to match certain words in commands so that they > are not written to the history file (but might possibly remain in the > buffer history which does not worry me much)? What I do is two things: For commands that I never want to see in my = history I make an alias for it that begins with a space character, like = so: alias mkpwlink=3D' mkpwlink' If the shell option histignorespace is set, the mkpwlink command will = not appear in the history. If I want to run a whole "session" of commands without history, I use = the history stack: HISTSTACK=3D0 alias histpush=3D"fc -p && ((HISTSTACK +=3D 1))" alias histpop=3D"fc -P && ((HISTSTACK -=3D 1))" I use the $HISTSTACK variable in my prompt to keep track of my history = level. Sebastian=