zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers <zsh-workers@zsh.org>
Subject: Re: PATCH: Make _xset complete more helpfully
Date: Thu, 12 May 2011 19:40:03 +0200	[thread overview]
Message-ID: <BANLkTi=90nTp37hEfiN-vqTctk97uneRjA@mail.gmail.com> (raw)
In-Reply-To: <110512102212.ZM13868@torch.brasslantern.com>

On 12 May 2011 19:22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On May 12, 10:14am, Bart Schaefer wrote:
> }
> }      27 [[ "$_type$_noprefix" = options && ! -prefix [-+]* ]] && \
> }      28     zstyle -T ":completion:${curcontext}:options" prefix-needed &&
> }      29         return 1
> }
> } I'm not sure it's correct for it to entirely punt when prefix-needed
> } is not defined.  Probably the right thing would be to assume a default
> } value instead ... but I don't really know.
>
> Ah.  Seems punting when not defined is equivalent to assuming a default
> value of "true":
>
>     For command options, this means that the initial `-', `+', or `--'
>     must be typed explicitly before option names will be completed.
>
> So changing _xset to use -O instead *is* the correct fix.

Okay, I'll commit that then. So this means passing -o and non-option
arguments is incorrect, as it is quite hard to type the leading - of a
word that starts with a letter? Reading the man page entry for
_describe I get the impression it is supposed to show non-option
arguments only as long as you don't type a -, not show nothing until
you do... (I don't want this behaviour either for _xset though, as I
said earlier).

-- 
Mikael Magnusson


  reply	other threads:[~2011-05-12 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 16:59 Mikael Magnusson
2011-05-12 17:14 ` Bart Schaefer
2011-05-12 17:22   ` Bart Schaefer
2011-05-12 17:40     ` Mikael Magnusson [this message]
2011-05-12 18:29       ` Bart Schaefer

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='BANLkTi=90nTp37hEfiN-vqTctk97uneRjA@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).