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

Re: PATCH: completion for hosts and character classes



Oliver Kiddle wrote:

> The other part of the patch is
> to complete the character classes like [:blank:]. This seems to work but
> as with my other attempts to patch _subscript, will probably need a bit
> of tidying up.

Using a rather dirty trick ;-) I would never had thought of that...

There is a small problem because it doesn't work with `[:<TAB>'
because without any characters before the `[' this isn't recognised as 
a subscript. The only solution I can see for this now would be to put
some code into _first, but somehow I don't feel like doing that...

While testing the above I found a little buglet in _expand which
insisted on expand `[:' to `[:(N)'.

Bye
 Sven

diff -u oc/Core/_expand Completion/Core/_expand
--- oc/Core/_expand	Fri Jul  2 11:34:39 1999
+++ Completion/Core/_expand	Fri Jul  2 11:42:44 1999
@@ -57,7 +57,7 @@
 #    `%o' in this string will be replaced by the original string.
 
 local exp word="$PREFIX$SUFFIX" group=-V
-
+set -x
 # Do this only for the first global matcher.
 
 [[ "$compstate[matcher]" -le 1 ]] || return 1
@@ -88,7 +88,7 @@
 # as the original string, we let other completers run.
 
 [[ $#exp -eq 0 ||
-   ( $#exp -eq 1 && "$exp[1]" = "$word" ) ]] && return 1
+   ( $#exp -eq 1 && "$exp[1]" = "$word"(|\(N\)) ) ]] && return 1
 
 # We have expansions, should we menucomplete them?
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author