From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15309 invoked from network); 4 Nov 1998 08:05:14 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Nov 1998 08:05:14 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id CAA11892; Wed, 4 Nov 1998 02:48:05 -0500 (EST) Resent-Date: Wed, 4 Nov 1998 02:48:05 -0500 (EST) Date: Wed, 4 Nov 1998 08:46:06 +0100 (MET) Message-Id: <199811040746.IAA28739@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: Peter Stephenson's message of Tue, 03 Nov 1998 18:03:24 +0100 Subject: Re: PATCH: completion or'ing and grouping Resent-Message-ID: <"AXHpU1.0.lv2.qQ0Gs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4526 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter Stephenson wrote: > > Got this to apply with a few bits applied by hand, without creating > any untoward problems as far as I can see. My first couple of > comments are: > > First, the last hunk of the patch deletes > > ! 1 or -1. For example, > ! > ! nofill(tt(compctl -s '`users`' -x 'n[1,@]' -k hosts -- talk)) > ! > ! will usually complete usernames, but if you insert an tt(@) after the > ! name, names from the array var(hosts) (assumed to contain hostnames, > ! though you must make the array yourself) will be completed. Other > ! commands such as tt(rcp) can be handled similarly. Oops, sorry. Below is a patch that can be used to easily fix this. Bye Sven *** Doc/Zsh/compctl.yo Tue Nov 3 11:45:24 1998 --- ../zsh-3.1.5/Doc/Zsh/compctl.yo Sun Oct 25 22:18:11 1998 *************** *** 536,542 **** including the var(index)th occurrence of this string will not be considered part of the completion, but the rest will. var(index) may be negative to count from the end: in most cases, var(index) will be ! 1 or -1. ) item(tt(N[)var(index)tt(,)var(string)tt(])...)( Like tt(n) except that the string will be --- 476,489 ---- including the var(index)th occurrence of this string will not be considered part of the completion, but the rest will. var(index) may be negative to count from the end: in most cases, var(index) will be ! 1 or -1. For example, ! ! nofill(tt(compctl -s '`users`' -x 'n[1,@]' -k hosts -- talk)) ! ! will usually complete usernames, but if you insert an tt(@) after the ! name, names from the array var(hosts) (assumed to contain hostnames, ! though you must make the array yourself) will be completed. Other ! commands such as tt(rcp) can be handled similarly. ) item(tt(N[)var(index)tt(,)var(string)tt(])...)( Like tt(n) except that the string will be -- Sven Wischnowsky wischnow@informatik.hu-berlin.de