Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in { completion's comma removal
- X-seq: zsh-workers 22127
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Bug in { completion's comma removal
- Date: Fri, 6 Jan 2006 12:36:55 -0800
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <237967ef0601061207h7802915dm580a12122a971242@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20060106180019.GB10111@xxxxxxxxxxxxx> <237967ef0601061207h7802915dm580a12122a971242@xxxxxxxxxxxxxx>
On Fri, Jan 06, 2006 at 09:07:19PM +0100, Mikael Magnusson wrote:
> While we're talking about {}, it also doesn't work so well on
> filenames with spaces
I haven't seen any problems with spaces as long as you put a backslash
in front of each one (which is what the completion of a filename with
spaces will automatically add). This is to be expected because a
command-line of "f{oo bar,oo-baz}" (without the quotes) is really two
args (neither one valid in syntax), but adding a backslash before the
space makes it a single arg that will expand into two, "foo\ bar" and
"foo-baz".
> and there's no way (that i've figured out) to escape a comma inside
> the braces.
Yes, this is a problem when completing and expanding in zle. It does
appear to work fine in the shell itself:
% echo ba{r\,1,z\,2}
bar,1 baz,2
However, when completing a filename with a comma inside an open {, zsh
does not add a backslash before the comma, and it strips any existing
backslash before a comma (e.g. pressing <TAB> on the above term would
incorrectly expand the line into "echo bar ba1 baz ba2").
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author