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

Picking parameters from last but one command



alias -g LP='$(lastparam)'
function lastparam(){ history -2 -2 | sed 's/.* //'}

>ls fred.txt
>cp joe sid
>vi LP      (where LP picks up fred.txt)

Better way?

-- 
zzapper
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips



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