zsh-workers
 help / color / mirror / code / Atom feed
* Re PATCH _file_systems & Re zstyle for _arguments feature request
@ 2002-01-18 18:24 Oliver Kiddle
  2002-01-22 10:19 ` Sven Wischnowsky
  0 siblings, 1 reply; 11+ messages in thread
From: Oliver Kiddle @ 2002-01-18 18:24 UTC (permalink / raw)
  To: zsh-workers

Sven wrote:

> With this, I agreee with Oliver that this might indeed be the real
> problem, so I changed the implementation of `compadd -x'. Messages
> added with that still always show up, but otherwise they are now like
> the descriptions added with -X. Then I changed _message to accept the
> option `-e <tag> <descr>' which adds such a description for the given
> tag.

This looks good and seems to work well. I've also not found any
problems with the patches for the fake style and for function arguments
in compdef.

On the subject of the fake style, if we find that there is demand for
something more powerful, using _alternative like specs would probably
be sufficient though I'm not sure whether that could be made to work
because the functions need to be called from somewhere. Using zstyle -e
with the current fake style allows some fairly powerful things to be
done but there can be problems..

While I'm on the subject of recent patches, the man page sectioning
patch is great so thanks for that Sven. I only wonder that the
separate-sections style shouldn't be the default. For people who don't
like it, the group-name style can re-group them but is there any way to
have one description for the re-grouped sections.

> We would have to look through the functions using
> _message to see which of them should be changed to use `_message -e'.

Yes. I could do that if you don't want to but it would have to then
wait as I'm about to leave for a week of skiing in Austria.

> I've done this for _chown as an example (to show you how simple it

Note that the tag in this _chown change should be `options' instead
of `option'.

I have found one small thing which I don't think is right though:
  zstyle ':completion::complete:grep:argument-1:*' fake one two three
  grep x<tab>
Because x doesn't match one two or three, it is now not displaying the
message `pattern' but it isn't saying `No matches for <tag>' either.

Continuing to display `pattern' would perhaps be best because matches
added with fake are probably not an exhaustive set. There are
completion functions where we don't add an exhaustive set of matches
either. An example would be after vncserver -geometry (any x y
combination would be valid). Perhaps in these cases, by using -x
instead of -X, the message should persist instead of getting `No
matches for...'.

It would also be very useful in cases such as this in _cvs:
  if (( $#vendor_branch )); then
    _wanted values expl 'vendor branch' compadd -a vendor_branch
  else
    _message 'vendor branch'
  fi

_wanted would need to be modified to take the -x option which would
cause it (or _description) to change -X in expl to -x. _cvs would
then only need to do:

  _wanted -x values expl 'vendor branch' compadd -a vendor_branch

> would be), but there are other places. The utility and core functions
> should be ok with this patch, except for _guard, where I'm not sure.
> Maybe we have to give it an option to tell it if the description is
> supposed to be a only message or such a new description-without-matches
> thing.

Looking at where we've used _guard, it certainly needs to be able to
use the description-without-matches thing but whether _guard might ever
be used for a plain message, I'm not sure. I can't see why it ever
would. We could always add an option for that later if it is needed.

Oliver

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-02-25  9:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 18:24 Re PATCH _file_systems & Re zstyle for _arguments feature request Oliver Kiddle
2002-01-22 10:19 ` Sven Wischnowsky
2002-02-01 17:03   ` new fake style, completion grouping etc Oliver Kiddle
2002-02-04  8:57     ` Sven Wischnowsky
2002-02-05 16:13       ` Oliver Kiddle
2002-02-05 16:24         ` Sven Wischnowsky
2002-02-06  9:33           ` Oliver Kiddle
2002-02-06 10:49             ` Sven Wischnowsky
2002-02-06 15:57               ` Oliver Kiddle
2002-02-25  9:07             ` Sven Wischnowsky
2002-02-25  9:10               ` Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).