zsh-workers
 help / color / mirror / code / Atom feed
* Convention question regarding completions
@ 2009-01-10  9:15 Richard Hartmann
  2009-01-21 17:11 ` Richard Hartmann
  2009-01-24 14:37 ` Doug Kearns
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Hartmann @ 2009-01-10  9:15 UTC (permalink / raw)
  To: Zsh Hackers' List

Hi all,

when writing completions, should I XAND only the options
which are really mutually exclusive like

 tar x
 tar c

or should I XAND the ones which won't work but won't hurt,
either like

  --verbose
  --quiet

or should I XAND even the ones which become superfluous
like the second option in

  deluser --remove-all-files
  deluser --remove-home

?

Personally, I lean towards the third, i.e. most inclusive
XAND rule, but I am interested what the others think.


Richard

PS: Just in case it's not clear from context what I mean
by XAND:

'(x)c[create a new archive]'
'(c)x[extract files from an archive]'


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

* Re: Convention question regarding completions
  2009-01-10  9:15 Convention question regarding completions Richard Hartmann
@ 2009-01-21 17:11 ` Richard Hartmann
  2009-01-24 14:37 ` Doug Kearns
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Hartmann @ 2009-01-21 17:11 UTC (permalink / raw)
  To: Zsh Hackers' List

Bump.

On Sat, Jan 10, 2009 at 10:15, Richard Hartmann
<richih.mailinglist@gmail.com> wrote:
> Hi all,
>
> when writing completions, should I XAND only the options
> which are really mutually exclusive like
>
>  tar x
>  tar c
>
> or should I XAND the ones which won't work but won't hurt,
> either like
>
>  --verbose
>  --quiet
>
> or should I XAND even the ones which become superfluous
> like the second option in
>
>  deluser --remove-all-files
>  deluser --remove-home
>
> ?
>
> Personally, I lean towards the third, i.e. most inclusive
> XAND rule, but I am interested what the others think.
>
>
> Richard
>
> PS: Just in case it's not clear from context what I mean
> by XAND:
>
> '(x)c[create a new archive]'
> '(c)x[extract files from an archive]'
>


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

* Re: Convention question regarding completions
  2009-01-10  9:15 Convention question regarding completions Richard Hartmann
  2009-01-21 17:11 ` Richard Hartmann
@ 2009-01-24 14:37 ` Doug Kearns
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Kearns @ 2009-01-24 14:37 UTC (permalink / raw)
  To: Zsh Hackers' List

On 1/10/09, Richard Hartmann <richih.mailinglist@gmail.com> wrote:
> Hi all,
>
>  when writing completions, should I XAND only the options
>  which are really mutually exclusive like
>
>   tar x
>   tar c
>
>  or should I XAND the ones which won't work but won't hurt,
>  either like
>
>   --verbose
>   --quiet
>
>  or should I XAND even the ones which become superfluous
>  like the second option in
>
>   deluser --remove-all-files
>   deluser --remove-home
>
>  ?
>
>  Personally, I lean towards the third, i.e. most inclusive
>  XAND rule, but I am interested what the others think.

Right, I don't think anyone is going to complain about your
implementation being too complete. :)

However, you'll see many of the completion functions tend to adopt the
first (and a half) approach E.g. "(- *)--version" without specifying
--version in any of the other option's exclusion lists because for
many commands --version simply overrides the other options rather than
producing an error.

Regards,
Doug


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

end of thread, other threads:[~2009-01-24 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-10  9:15 Convention question regarding completions Richard Hartmann
2009-01-21 17:11 ` Richard Hartmann
2009-01-24 14:37 ` Doug Kearns

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