From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10420 invoked from network); 23 Jun 1998 13:07:12 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1998 13:07:12 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id JAA10171; Tue, 23 Jun 1998 09:02:30 -0400 (EDT) Resent-Date: Tue, 23 Jun 1998 09:02:30 -0400 (EDT) Date: Tue, 23 Jun 1998 15:02:18 +0200 (MET DST) Message-Id: <199806231302.PAA11307@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: Didier Verna's message of 23 Jun 1998 13:39:58 +0200 Subject: PATH: was Re: [Q] user-defined completion Resent-Message-ID: <"s84Cf3.0.sU2.bTwZr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4150 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Didier Verna wrote: > > Sven Guckes writes: > > > Quoting Didier Verna (verna@inf.enst.fr): > I'd like to write a function for > > special command line completion, but that is > aware of the program whose > > command line we're completing. After reading the > doc, I see that > > user-defined functions get 2 arguments: pre and postfix. Is there a way to > > make such functions aware of the program name ? Any ideas ? > > > Are talking about "completion control" with "compctl"? > > Possibly, yes. > > > > "man zshcompctl"! > > That's what I meant by saying "after reading the doc". But it seems > that the answer is no. So, in case I'm missing something, or I'm just blind, > I would have liked to know if somebody knows a way to achieve this. > Here is a patch for the Docs that makes `read' be mentioned at the description for the `-K' option. Bye Sven *** Doc/Zsh/compctl.yo.old Tue Jun 23 14:57:59 1998 --- Doc/Zsh/compctl.yo Tue Jun 23 15:00:12 1998 *************** *** 255,260 **** --- 255,262 ---- passed two arguments: the prefix and the suffix of the word on which completion is to be attempted, in other words those characters before the cursor position, and those from the cursor position onwards. The + whole command line can be accessed with the tt(-c) and tt(-l) flags + of the tt(read) builtin. The function should set the variable tt(reply) to an array containing the completions (one completion per element); note that tt(reply) should not be made local to the function. From such a function the -- Sven Wischnowsky wischnow@informatik.hu-berlin.de