Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion for hosts and character classes
- X-seq: zsh-workers 6945
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: completion for hosts and character classes
- Date: Fri, 2 Jul 1999 11:48:58 +0200 (MET DST)
- In-reply-to: Oliver Kiddle's message of Thu, 01 Jul 1999 15:34:21 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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