From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2320 invoked from network); 18 Jan 1999 17:41:20 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Jan 1999 17:41:20 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA03587; Mon, 18 Jan 1999 12:36:13 -0500 (EST) Resent-Date: Mon, 18 Jan 1999 12:36:13 -0500 (EST) Message-Id: <9901181720.AA42924@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Completion weirdity after `for' Date: Mon, 18 Jan 1999 18:20:06 +0100 From: Peter Stephenson Resent-Message-ID: <"zvVow2.0.-t.D4tes"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4925 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu After for f in completion takes place as if the command name is `in', not `for'. This showed up because I have a function called `in' such that `in dir cmdlist' executes cmdlist in directory dir, so I have the first word after `in' complete directories, which is not what is wanted here. The natural way to handle this would be such that everything up to and including the list were treated as words of a fictitious `for' command, so e.g. you can specify special behaviour for arguments 1 and 2 and default for the rest. This is possible to fix, but like most things to do with get_comp_string() the fix could be a little ad hoc. Maybe other reserved words need some fix-up, but for and foreach are the worst offenders since others tend to be followed by a specific command which then works in the expected way. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy