Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZLE Widget: Insert last word (except &)
- X-seq: zsh-users 3268
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: ZLE Widget: Insert last word (except &)
- Date: Tue, 11 Jul 2000 23:04:38 +0000
- In-reply-to: <20000712000509.A124@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000711140506.5143gmx1@xxxxxxxxxxxx> <Pine.LNX.4.10.10007111846240.1513-100000@xxxxxxxxxxxxxxx> <20000712000509.A124@xxxxxxxxxxxxxxx>
On Jul 12, 12:05am, Vincent Lefevre wrote:
} Subject: Re: ZLE Widget: Insert last word (except &)
}
} On Tue, Jul 11, 2000 at 19:29:55 +0200, Christoph Lange wrote:
} > I found it annoying that the widget insert-last-word inserts `&' if the
} > previous command was a background job. I'd rather like the last word
} > *before* `&' to be inserted.
}
} Me too!
Presumably what you'd really rather is that the last non-separator word
is inserted. Even with Christoph's widget, if you type "echo foo;" and
then invoke smart-insert-last-word you get ";" inserted.
} IMHO, this behavior should be in zsh as standard.
But there's more; "echo foo 2>&1" followed by {smart-,}insert-last-word
inserts "1", and prefixing it with ESC 2 inserts "2>&".
Or "(echo foo)", where the last word is ")". What about "{ echo foo; }"
or the same suffixed with a redirection (inside or outside the braces)?
If we don't accept the shell syntax definition of a "word", how can we
choose a single definition of what constitutes a "word" that everyone
will agree on?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author