From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7975 invoked from network); 27 Jun 2000 15:02:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jun 2000 15:02:46 -0000 Received: (qmail 14683 invoked by alias); 27 Jun 2000 15:02:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12086 Received: (qmail 14634 invoked from network); 27 Jun 2000 15:02:34 -0000 From: "Bart Schaefer" Message-Id: <1000627150228.ZM30624@candle.brasslantern.com> Date: Tue, 27 Jun 2000 15:02:28 +0000 In-Reply-To: <200006271318.PAA26871@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: Re: (forw) --help able programs and completion]" (Jun 27, 3:18pm) References: <200006271318.PAA26871@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: (forw) --help able programs and completion] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 27, 3:18pm, Sven Wischnowsky wrote: } Subject: PATCH: Re: (forw) --help able programs and completion] } } Hm. Ok, ok. Here is a patchlet that also tries to emphasize compdef } because this is almost becoming a FAQ. Thanks for writing the text, but everything else in that section is alphabetized now. This moves _use_lo into alphabetical order and also creates a separate (very short) entry for _files in its correct alphabetical location. (It's easier to search for that way, in the info browser.) Index: Doc/Zsh/compsys.yo =================================================================== @@ -2687,25 +2687,6 @@ Like tt(_tags) this function supports the tt(-C) option to give a different name for the argument context field. ) -findex(_use_lo) -item(tt(_use_lo))( -This function is a simple wrapper around the tt(_arguments) function -described below. It can be used to automatically complete long -options for commands that understand the `tt(-)tt(-help)' option -(`tt(_use_lo)' is for `use long options'). It is not intended to be -used from completion functions but as a top-level completion function -in its own right. For example, to enable option completion for the -commands tt(foo) and tt(bar), one would call: - -example(compdef _use_lo foo bar) - -in one of the initialization files after the call to tt(compinit). - -The default installation uses this function only to generate -completions for some GNU-commands because to complete the options, the -command has to be called and hence it shouldn't be used if one can't -be sure that the command understands the `tt(-)tt(-help)' option. -) findex(_arguments) item(tt(_arguments) var(spec) ...)( This function can be used to complete words on the line by describing the @@ -3279,6 +3260,16 @@ a similar format; this ensures that user-specified styles are correctly passed down to the builtins which implement the internals of completion. ) +findex(_files) +item(tt(_files))( +The function tt(_files) uses the tt(file-patterns) style and calls +tt(_path_files) with all the arguments it was passed except for tt(-g) +and tt(-/). These two options are used depending on the setting of the +tt(file-patterns) style. + +See tt(_path_files) below for a description of the full set of options +accepted by tt(_files). +) findex(_funcall) item(tt(_funcall) var(return) var(name) [ var(args) ... ])( If a function var(name) exists, it is called with the arguments @@ -3395,18 +3386,12 @@ passed unchanged to the tt(compadd) builtin. ) findex(_path_files) -findex(_files) -item(tt(_path_files) and tt(_files))( +item(tt(_path_files))( The function tt(_path_files) is used throughout the completion system to complete filenames. It allows completion of partial paths. For example, the string `tt(/u/i/s/sig)' may be completed to `tt(/usr/include/sys/signal.h)'. -The function tt(_files) uses the tt(file-patterns) style and calls -tt(_path_files) with all the arguments it was passed except for tt(-g) -and tt(-/). These two options are used depending on the setting of the -tt(file-patterns) style. - The options accepted by both tt(_path_files) and tt(_files) are: startitem() @@ -3695,6 +3680,25 @@ tt(curcontext) parameter. This allows to make tt(_tags) use a more specific context name without having to change and reset the tt(curcontext) parameter (which would otherwise have the same effect). +) +findex(_use_lo) +item(tt(_use_lo))( +This function is a simple wrapper around the tt(_arguments) function +described above. It can be used to automatically complete long +options for commands that understand the `tt(-)tt(-help)' option +(`tt(_use_lo)' is for `use long options'). It is not intended to be +used from completion functions but as a top-level completion function +in its own right. For example, to enable option completion for the +commands tt(foo) and tt(bar), one would call: + +example(compdef _use_lo foo bar) + +in one of the initialization files after the call to tt(compinit). + +The default installation uses this function only to generate +completions for some GNU-commands because to complete the options, the +command has to be called and hence it shouldn't be used if one can't +be sure that the command understands the `tt(-)tt(-help)' option. ) findex(_wanted) item(tt(_wanted) [ tt(-C) var(name) ] [ tt(-12VJ) ] var(tag) var(name) var(descr) var(command) var(args) ...)( -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net