Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Another slight weirdness



I've set the configuration:

  compconf completer=_complete
           correct_accept=2n \
           correct_prompt="Correcting (%e error[s]):"

so it's not actually supposed to be using correcton or approximation, and a
(not all that useful) directory containing

Xbarfoo2   Xfoo       Xnonofoo

and when I do

% echo foo<TAB>

(any letter of foo is enough, in fact, though I found out about this from
omitting the first character) I get offered all the files in the directory,
not just Xfoo.  Any ideas?  I think I've got all the patches (and if I
haven't, you'd better tell me about it :-)).  globcomplete is not set.  I
even get this with

_match_test () {
        (( compstate[matcher] <= 1 ))
}
_match_pattern () { }

and no `compctl -M'.


By the way, I never liked the way _setopt and _unsetopt reflected the
current state of the options, since usually I can't remember what's set and
the fact I don't get offered all possibilities just confuses me.  The fact
you now have to two $(...) calls on every single completion just to store
the current values --- this does not seem to be the sort of thing
completion should be doing by default --- makes me think even more strongly
that this is just not worth it for the basic set-up and anyone
sophisticated enough should add it themselves.  Furthermore, I get the same
list at the moment if I do `setopt ^D' or `unsetopt ^D' (that's what I
*want*, but it's not what should happen with the current functions).  Oh,
wait, I see why.  Except it still doesn't work properly because of all
those *@!@!#!** `no's when you run `unsetopt'.  That's probably a bug.

--- Completion/Core/_main_complete.uo	Tue Mar 23 15:59:51 1999
+++ Completion/Core/_main_complete	Tue Mar 23 16:21:31 1999
@@ -18,7 +18,7 @@
 local comp _set_options _unset_options
 
 _set_options=("${(@f)$({ unsetopt kshoptionprint; setopt } 2>/dev/null)}")
-_unset_options=("${(@f)$({ unsetopt kshoptionprint; setopt } 2>/dev/null)}")
+_unset_options=("${(@f)$({ unsetopt kshoptionprint; unsetopt } 2>/dev/null)}")
 
 setopt localoptions nullglob rcexpandparam
 unsetopt markdirs globsubst shwordsplit nounset ksharrays

-- 
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