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

Re: alias hl='$(history -n -2 -2) '



Peter Stephenson <pws@xxxxxxx> wrote in news:EXCHANGE03bJjyve2q70000ee73
@exchange03.csr.com:


> You could get the history part working better with
> 
> alias hl='eval "$(history -n -2 -2)" '
> 
That fixes it, thnx
> 
> I presume you're trying to avoid bang-history for some reason.  If you're
> not wedded to aliases you could use a zle function to retrieve specific
> stuff from the history.
> 
It's just that !-2 is a bit a pain to type (sorry)!


-- 
zzapper
Success for Techies
http://SuccessTheory.com/ vim, zsh & success tips




Messages sorted by: Reverse Date, Date, Thread, Author