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

Re: refering to 2nd from last history parameter?



On Mon, 26 Jan 2015 12:05:14 +0000
zzapper <david@xxxxxxxxxxxxxx> wrote:
> Still think it's a pity that there's no !$-1 , !$-2 etc

The summary of the discussion is that there is, but it means the wrong
thing: "-" is always a range in history arguments.  Clearly this
isn't what you actually want here, or ever would.

We could special case the meaning here: given that ranges have to be in
order, a range starting with "$" is by definition useless.  It's a bit
kludgy but this is !-history so it's hard to imagine anyone looking for
elegance.  Does this break anything?

I was wondering about using a different character, but I think any
solution where "minus" is not encoded by "-" is too obscure to be
useful.

pws



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