From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11505 invoked from network); 24 Feb 2006 22:20:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Feb 2006 22:20:14 -0000 Received: (qmail 12266 invoked from network); 24 Feb 2006 22:20:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Feb 2006 22:20:08 -0000 Received: (qmail 15069 invoked by alias); 24 Feb 2006 22:20:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22299 Received: (qmail 15059 invoked from network); 24 Feb 2006 22:20:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Feb 2006 22:20:04 -0000 Received: (qmail 11804 invoked from network); 24 Feb 2006 22:20:04 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 24 Feb 2006 22:20:04 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 3E2B4726; Fri, 24 Feb 2006 14:20:03 -0800 (PST) Date: Fri, 24 Feb 2006 14:20:03 -0800 From: Wayne Davison To: zsh-workers@sunsite.dk Subject: problem with _expand (I think) Message-ID: <20060224222003.GB29221@dot.blorf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060126 Here's something strange where a global alias of mine seems to be skipped by _expand in certain circumstances. To duplicate this, start with "zsh -f" and enter these commands: autoload -U compinit compinit zstyle ':completion:*' completer _expand _complete bindkey '\t' complete-word alias -g ,f='|fgrep' OK, that ensures that tab does not use expand-or-complete, which does not exhibit the bug. Note that I created a global alias that lets me type ",f" instead of "|fgrep". We also need a file named "some-file" with the following lines in it: foo bar Now let's try to use TAB to expand a back-tick expression: echo `fgrep some-file o ,f -v a` That outputs "foo" when run, but the expansion gets "some-file:bar" instead of "foo" if TAB is pressed. This is apparently because the ",f" was treated as a file, and the -v option was reordered in front of the 'o' (due to gnu's non-posix command-line parsing). I tried this in 4.2.5 and 4.3.0-dev-5, and both fail to get this right. FYI. ..wayne..