Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: I broke my !$



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