From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22561 invoked by alias); 7 Apr 2011 18:53:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28978 Received: (qmail 17747 invoked from network); 7 Apr 2011 18:53:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Thu, 7 Apr 2011 14:44:17 -0400 (EDT) From: "Benjamin R. Haskell" To: Zsh Workers Subject: Expansion bug with braces and spaces Message-ID: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII 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 $ diff -ur Download/bug\ {\(1 (hitting tab again made it worse) $ diff -ur Download/bug\ {\(1 $ diff -ur Download/bug\{ \(1 (but not again, since the file no longer exists) $ diff -ur Download/bug\{ \(1 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{ $ 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 $ print -l /tmp/brace-bug/file\{ abc -- Best, Ben