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

Re: PATCH: completion or'ing and grouping



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@xxxxxxxxxxxxxxxxxxxxxxx



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