zsh-workers
 help / color / mirror / code / Atom feed
* Re: a couple of completion questions
@ 2000-06-07  8:50 Sven Wischnowsky
  2000-06-07 15:06 ` "antecedents" [was Re: a couple of completion questions] Clint Adams
  2000-06-07 15:38 ` _argument sets " Clint Adams
  0 siblings, 2 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-06-07  8:50 UTC (permalink / raw)
  To: zsh-workers


Clint Adams wrote:

> Included at the bottom of this message is my current working copy of _dpkg.
> 
> Firstly, is there a simple way to change the _arguments for
> remove|purge|status|listfiles in the state switch to use -A
> without factoring out each case and adding the appropriate
> options?

Sorry, I don't understand... what do you want to do?

> My second question has now been invalidated, so I'll substitute
> these two thoughts: it would be nice if -iR engaged the state engine
> in the same way -i -R or -R -i does;

If I understand you correctly here, than that's what we are discussing 
currently in that rpm-thread. I hope to be able to work on this soon.

> and also, the call to _arguments
> used in the state switch for install/record_avail does not behave
> as described in zshcompsys(1), though I'm taking advantage of that.

I know nothing about dpkg and friends. In which way does it behave
differently from what's documented and how do you make use of it
(i.e.: is there something wrong? or only documented in the wrong way?
or should have both what it's doing and what's documented?)?

Bye
 Sven


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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: "antecedents" [was Re: a couple of completion questions]
@ 2000-06-08  9:36 Sven Wischnowsky
  2000-06-08 17:41 ` Clint Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-06-08  9:36 UTC (permalink / raw)
  To: zsh-workers


Clint Adams wrote:

> > Sorry, I don't understand... what do you want to do?
> 
> Okay.  I want to use _arguments -A in the state switch at the bottom.
> Originally, install and record_avail were the same case, but when I
> added -A, they wouldn't complete, so I had to insert the options
> that had gotten the user to that state, which is why install and
> record_avail are two separate cases now.
> 
> I want to avoid making remove, purge, status, and listfiles
> four separate cases, yet still retain the -A to _arguments.
> My last resort would probably be to define four new arrays with
> the short and long options and then use something like
> ${(P)${:-_dpkg_actions_${state}}}, but I was hoping that there
> was a better way.

Aha. Well, if it finds a string not described by one of the
option-specs it has to take it to be an argument.

Hm, should we add an option, to be combined with -A (or an argument to 
-A?) to tell it that it should consider words starting with [-+] to be 
arguments? Or, probably better, let -A take an argument, a pattern and 
all words matching it are not taken to be arguments and hence don't
keep it from completing option.


Bye
 Sven


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


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

end of thread, other threads:[~2000-06-08 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-07  8:50 a couple of completion questions Sven Wischnowsky
2000-06-07 15:06 ` "antecedents" [was Re: a couple of completion questions] Clint Adams
2000-06-07 15:38 ` _argument sets " Clint Adams
2000-06-08  9:36 "antecedents" " Sven Wischnowsky
2000-06-08 17:41 ` Clint Adams

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).