Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Completion weirdity after `for'
- X-seq: zsh-workers 4925
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Completion weirdity after `for'
- Date: Mon, 18 Jan 1999 18:20:06 +0100
After
for f in <TAB>
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 <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author