From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12478 invoked by alias); 23 Jan 2015 17:33:22 -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: 19773 Received: (qmail 12600 invoked from network); 23 Jan 2015 17:33:10 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=DmOLzhIAx5Kexc4SnGxGksaHOME+8d47DKZ5hjhyuxw=; b=u2eVCkj0voJt42HWL0iHu8kAgf9/KPYJMb8u34Oo7HS1kefwwh0X02X7cGLZ5M/soU WiVw0HpQX5Es1qOY1YwZTdAvGNthVU1ja50NLH95NVr+d8d6StJ2aYKCvDO5msbuHRi2 ay3CxeWdg1DRYSTwCfMtkmareYvgOdRcjQ9yDaPupz0rayKgYSzvEonlMbo31Zt++EoB /dbz6Ez8DU5aBnBuQy66ydIJqY86rAgbVzsei84DW2h0UmQzMGs5EVzfN+uawtzitaYN SeRB5d/9iBE4u34hyWu7EWRBlVj36FclaSVM7GqoS6oqVz6qoV3Dqn8DAB24FbhhbuCR 7/LQ== X-Received: by 10.107.12.88 with SMTP id w85mr4898085ioi.28.1422034386391; Fri, 23 Jan 2015 09:33:06 -0800 (PST) MIME-Version: 1.0 From: Ramkumar Ramachandra Date: Fri, 23 Jan 2015 12:32:26 -0500 Message-ID: Subject: Excluding command from history list To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Hi, I have this problem where I'm always at the risk of hitting RET at the wrong command during a ^R survey. Especially if you have commit access to an important codebase, $ git svn dcommit or $ git push -f might be a disastrous at the wrong time. Hence, I want to exclude *dcommit* from the history list; excluding it from the history file is pretty simple: zshaddhistory () { [[ $1 != *dcommit* ]] } ... but I haven't figured out how to do it for the history list, which is what really matters (because you're always looking for recent history). Thanks. Ram