Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Refereing to elements in current command line
- X-seq: zsh-users 10696
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Refereing to elements in current command line
- Date: Fri, 8 Sep 2006 17:05:54 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- References: <Xns98387211C8371zzappergmailcom@xxxxxxxxxxx> <450198AD.1070104@xxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Drew Perttula <drewp@xxxxxxxxxxxxxxx> wrote in news:450198AD.1070104
@bigasterisk.com:
>
> cp fredjoesid.php !#$:s/fred/dan
>
> then tab to check that the last argument expands the way you want
>
Drew,
Yep that's what I was looking for
Summary AFAICT
For CURRENT line (the # designates current line)
!#:0 command
!#^ first parameter
!#:1 first parameter
!#:1-4 first 4 parameters
!#$ last parameter
!#* all parameters
!#$:s/bash/zsh
For Previous Command (for comparison)
!! repeat
!:0 command
!^ first parameter
!:1 first parameter
!:1-4 first 4 parameters
!$ last parameter
!* all parameters
!!:s/bash/zsh
For last but one command
!-2:2 second parameter of second but last command
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author