From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9454 invoked from network); 2 Jul 1999 09:49:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jul 1999 09:49:08 -0000 Received: (qmail 3117 invoked by alias); 2 Jul 1999 09:49:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6945 Received: (qmail 3110 invoked from network); 2 Jul 1999 09:48:59 -0000 Date: Fri, 2 Jul 1999 11:48:58 +0200 (MET DST) Message-Id: <199907020948.LAA18025@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Thu, 01 Jul 1999 15:34:21 +0100 Subject: 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 `[:' 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@informatik.hu-berlin.de