Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Expansion bug with braces and spaces
- X-seq: zsh-workers 28979
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: Re: Expansion bug with braces and spaces
- Date: Thu, 7 Apr 2011 20:59:58 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Yrl6nnPc8kzw7b9ep0CeRPYc0GatKZUVrgjtsDENm1c=; b=RvQ1XlVz/tnYXiXrflaKYbKb4j/41WxFTGGIM7yg71E0nLzszlUenjhLX7ICmHtp6A nToo6HNZ1FxxlKd1PBbJ3brX26E5VAX2fPI4mYd3P/cwj4Db33sTKYLMCkE/Kh1lUnPi VWApc9sqYVQ7DrLO30IJ6KItARXQ+vZakGfgs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ph2Kj4bwL4SO2ypef/C6n4lT+Lw++dDw0CO04NfxSKGgnha14I0CjNNUiHv3e9HnCL 4N5/6/aQX5CAMb9KknjAxsE6by5/9KUiAoVDsiLw8vQBA+Dn7rCGJv2UUb414dHeIU2g ooNSc1XayHYgtjmaNlAEdjwNJmmkm1D/1QLaQ=
- In-reply-to: <alpine.LNX.2.01.1104071433150.28316@hp>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <alpine.LNX.2.01.1104071433150.28316@hp>
On 7 April 2011 20:44, Benjamin R. Haskell <zsh@xxxxxxxxxx> wrote:
> There seems to be some issue with expansion of brace alternatives when
> there's a space in the filename. First noticed when I had a bunch of poorly
> named downloads:
>
> $ ls -1 Download/bug\ \(*
> Download/bug (1).patch
> Download/bug (2).patch
> ...etc...
> Download/bug (17).patch
> Download/bug (18).patch
>
> And I wanted to see the differences between two of them:
> $ diff -ur Download/bug\ \({1<Tab>
> $ diff -ur Download/bug\ {\(1
>
> (hitting tab again made it worse)
> $ diff -ur Download/bug\ {\(1<Tab>
> $ diff -ur Download/bug\{ \(1
>
> (but not again, since the file no longer exists)
> $ diff -ur Download/bug\{ \(1<Tab>
>
>
> A more minimal example:
>
> $ bindkey "^I" expand-or-complete
>
> $ mkdir /tmp/brace-bug
> $ touch /tmp/brace-bug/file\ {abcd,abce}
>
> # this one's weird, but still okay:
> $ print -l /tmp/brace-bug/file\ ab{<Tab>
> $ print -l /tmp/brace-bug/file\ a{bc
>
> # this one's not okay, since it's now quoting the brace:
> $ print -l /tmp/brace-bug/file\ {a<Tab>
> $ print -l /tmp/brace-bug/file\{ abc
It's at least not a new issue, I reported it back in 2006 but was
never able to produce a minimal testcase starting from zsh -f. And by
able I mean it never annoyed me enough :).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author