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

Re: refering to 2nd from last history parameter?



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote in 
news:150122091734.ZM11366@xxxxxxxxxxxxxxxxxxxxxx:

> On Jan 22, 12:18pm, zzapper wrote:
> }
> } ls !$    last parameter of previous command
> } 
> } echo a b c d e f g h
> } 
> } I don't think I can grab 'g' without counting left to right
> 
> Not exactly pretty, but in two steps:
> 
>     !!:-:p
>     echo !!:$
> 

 !:-:p isn't that a smiley?



-- 
zzapper
https://twitter.com/dailyzshtip

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com




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