Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Picking parameters from last but one command
- X-seq: zsh-users 11102
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Picking parameters from last but one command
- Date: Sat, 6 Jan 2007 19:13:43 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- Sender: news <news@xxxxxxxxxxxxx>
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