Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: I broke my !$
- X-seq: zsh-users 16464
- From: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: I broke my !$
- Date: Wed, 5 Oct 2011 17:48:03 +0200
- Cc: Jay Levitt <jay.levitt@xxxxxxxxx>, zsh-users@xxxxxxx
- 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=
- In-reply-to: <20111005121950.GA20868@daniel3.local>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CANSg5mpWGJvBJODuECM1PzcSp0rdw19AdOMpBzxZ8fZZhh-Ykw@mail.gmail.com> <20111005121950.GA20868@daniel3.local>
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 <d.s@xxxxxxxxxxxxxxxxxx>
> Jay Levitt wrote on Wed, Oct 05, 2011 at 07:41:29 -0400:
> > What'd I do?
>
> Binary search your zshrc?
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author