Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug in guess what?
- X-seq: zsh-workers 5437
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Bug in guess what?
- Date: Fri, 19 Feb 1999 17:44:58 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I think I've got all the patches to date (I certainly hope so), but I'm
still getting problems with the following completion:
% _foo() { [[ -string '=' ]] && complist -f; }
% defcomp _foo foo
% foo bar=^D
now pauses for a long time, then asks if I want to see its list of 1931
completions, which I don't much but they seem to be external commands
(except that there are 2757 of those and I get them much more quickly).
-class does the same. However, the following works splendidly.
_foo() {
if [[ $PREFIX = *'='* ]]; then
IPREFIX=${PREFIX%%=*}=
PREFIX=${PREFIX#*=}
complist -f
fi
}
(And maybe it's just me, but sometimes when I look at set -x output from
these things, PREFIX is full of \'s (such as \= in the above), and
sometimes they're not there. I haven't worked this out, but maybe it's not
important.)
--
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