zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: problem with _arguments exclusion lists
Date: Fri, 20 Apr 2001 10:31:34 +0200 (MET DST)	[thread overview]
Message-ID: <200104200831.KAA14053@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: <3ADEEFCC.E3D1C6ED@u.genie.co.uk>


Let me try to summarise:


1) Add an option to _arguments, that says that it should always try to
   complete options after options specified with `-x-:...' or `-x+:...'.

   This makes it a stronger form of -W: -W makes it complete options
   after options that get an argument in the next word.  The new option
   says that other options are to be completed even if the argument
   has to or may be given in the same word.


2) Also, make it try completing options in those places even if the new
   _arguments-option is not given but the action for the argument
   returns non-null.

   The `returns non-null' is, of course, problematic again if the option-
   argument has to be completed with a `->state' action.  But I think if
   a command is complicated enough to require that, it should use the
   option from 1) anyway.

   And add a small utility function that can be put into an argument-
   action and tests if the string typed so far matches some pattern.
   For simplicity I would make it use the description given in the
   _arguments-spec.  And if a simple pattern match is enough for most
   cases, this makes it sound as if we should just add a new action-
   syntax, avoiding the need for an extra function consisting of only
   two lines.  More complicated tests can still be implemented with
   additional functions, of course.
   I don't remember exactly, but I think we were talking about pattern
   matching in _arguments-actions some time ago.  If we decide to put
   the simple matching-case into _arguments itself, we could also go
   another way: instead of making it a new type of action, we make it be
   some kind of `guard' that can be prefixed to any of the action-types
   _arguments supports now.  If it is given before an empty option, it
   only says if a message should be displayed or not.
   I think I like this even better.


Ok, would this be enough for now?  Later we can, as suggested by Oliver,
add a way to change the behaviour on a per-option basis, using the
option from 1) as the default.  If we ever meet a command that needs
that much control.


Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


  reply	other threads:[~2001-04-20  8:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-12 14:32 Oliver Kiddle
2001-04-17  9:50 ` Sven Wischnowsky
2001-04-17 10:44   ` Oliver Kiddle
2001-04-17 11:28     ` Sven Wischnowsky
2001-04-17 13:55       ` Oliver Kiddle
2001-04-17 14:10         ` Sven Wischnowsky
2001-04-19 14:01           ` Oliver Kiddle
2001-04-20  8:31             ` Sven Wischnowsky [this message]
2001-04-23  8:59               ` Oliver Kiddle
2001-04-24 10:00                 ` Sven Wischnowsky
2001-04-26 11:00                   ` Oliver Kiddle
2001-04-26 12:10                     ` Sven Wischnowsky
2001-04-25  7:10                 ` Sven Wischnowsky
2001-04-26 13:55 Oliver Kiddle
2001-04-26 14:35 ` Sven Wischnowsky
2001-05-04 16:20   ` Oliver Kiddle
2001-05-07 11:10     ` Sven Wischnowsky
2001-05-08 11:45       ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200104200831.KAA14053@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).