Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compctl -X



Zoltan Hidvegi wrote:
> If there is a unique completion, do it and do
> not disturb the user.  If there are no or more than one completions,
> explain.

hmm, that's not how I use it:  I want to know where a completion or
completion list has come from when there are no visual cues, so that
I know, for example, that the list or single completion found does
not come from an existing file, any time one or more completions
were found.  It looks like another flag is required for this.

It means the manual entry I wrote is rather confusing, too.

*** Doc/Zsh/compctl.yo~	Fri Apr 25 06:37:27 1997
--- Doc/Zsh/compctl.yo	Tue Aug  5 09:49:45 1997
***************
*** 270,281 ****
  the empty string all words are taken (as with `tt(*)').  A typical
  use is
  
! nofill(tt(compctl -D -f PLUS() -H 0 '' -X '(No file found; using history)'))
  
  which forces completion to look back in the history list for a word if
! no filename matches.  The explanation string is useful as it tells
! the user that no file of that name exists, which is otherwise
! ambiguous. (See the next section for tt(-X)).
  )
  enditem()
  texinode(Control Flags)()(Flags with Arguments)(Option Flags)
--- 270,279 ----
  the empty string all words are taken (as with `tt(*)').  A typical
  use is
  
! nofill(tt(compctl -D -f PLUS() -H 0 ''))
  
  which forces completion to look back in the history list for a word if
! no filename matches.
  )
  enditem()
  texinode(Control Flags)()(Flags with Arguments)(Option Flags)
***************
*** 346,351 ****
--- 344,351 ----
  item(tt(-X) var(explanation))(
  Print var(explanation) when trying completion on the current set of
  options. A `tt(%n)' in this string is replaced by the number of matches.
+ The explanation only appears if completion was tried and there was
+ no unique match.
  )
  enditem()
  texinode(Alternative Completion)(Extended Completion)(Option Flags)(Programmable Completion)

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, Platanenallee 6, 15738 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author