From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3722 invoked by alias); 5 Oct 2011 15:48:32 -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: 16464 Received: (qmail 619 invoked from network); 5 Oct 2011 15:48:30 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.178 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RkScR3hKCoNyso+7pPaQ5ukSWzaV3j1mCQ0Wev4UArQ=; b=sKfzCdcd1BMjoVhrChHD38soqqqrizaE4cj86pKqvbU8EPaVsA47geS0MabeDCH43M phYw0xD0ra8B4tWFpTu74fJqyh9B10L16fyEWVssxo6HLNunJiDFiQekaNA2VnOCfV/6 Cn1fEwboA6fks2Mnl4ro+SDPQ4L6W7zSyDU3A= MIME-Version: 1.0 In-Reply-To: <20111005121950.GA20868@daniel3.local> References: <20111005121950.GA20868@daniel3.local> From: Julien Nicoulaud Date: Wed, 5 Oct 2011 17:48:03 +0200 Message-ID: Subject: Re: I broke my !$ To: Daniel Shahaf Cc: Jay Levitt , zsh-users@zsh.org Content-Type: multipart/alternative; boundary=0016e64cbc02575a1704ae8f23ba --0016e64cbc02575a1704ae8f23ba Content-Type: text/plain; charset=ISO-8859-1 Same for me, messing with zsh_add_history hook breaks history expansion: history_strip_passwords() { # Strip out -Dgpg.passphrase option value (Maven) print -sr "${${1%%$'\n'}//(#b)(gpg.passphrase=)*[:space:]/$match[1]}" fc -p } add-zsh-hook zshaddhistory history_strip_passwords With this hook, history exapnsions like "!$" or "!!" always return the whole history line... 2011/10/5 Daniel Shahaf > Jay Levitt wrote on Wed, Oct 05, 2011 at 07:41:29 -0400: > > What'd I do? > > Binary search your zshrc? > --0016e64cbc02575a1704ae8f23ba--