Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can I refer to last but one parameter?
- X-seq: zsh-users 11226
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Can I refer to last but one parameter?
- Date: Tue, 27 Feb 2007 13:00:14 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- References: <Xns98E47CDE77ADBzzappergmailcom@xxxxxxxxxxx> <20070227124408.4414e740.pws@xxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> wrote in
news:20070227124408.4414e740.pws@xxxxxxx:
> zzapper <david@xxxxxxxxxx> wrote:
>> Hi
>>
>> Can I refer to last but one parameter?
>>
>> e.g.
>>
>> vi !$-1 ## wrong does not work
>
> You have to count from the start of the line and used !:<argnum>.
>
> "-" refers exclusively to ranges, even if one of the arguments is missing,
> so for example !:-1 means the range of words 0 (the command word) and 1,
> while !:$-1 is the not very useful range from the last to the the first
> argument.
>
the answer is no then?
I wanted to do this with rather a mucky line where counting from 0 was a
chore
--
zzapper
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author