Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Make _xset complete more helpfully
- X-seq: zsh-workers 29249
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Make _xset complete more helpfully
- Date: Thu, 12 May 2011 19:40:03 +0200
- Cc: zsh-workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Xc+LASmpzEKABmK+t4DulAutf3CbJUAY3pgxUQbmrz8=; b=ZMx9aWBjsJEMWaRJD5eW7IRWb8dTx5WlPn3WO5QfIDtyBobJomEl9VzFzRpBaUVGze JCRdI2VbJ9nAHssn7akKAv4q0h59kYvXOTPMqjaCl4Cd5Hus6qq/g3NgaovTo5s8Pz0r rHS5Zb45AbBLIya96hcMUeoi7fpMT+wEovdnQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=STAXy//PnKLTSOsJqGT0Wmlku0mdfm3fH3OxjriJUUY+kFXWmDjlOyzU4DIlcaUsry QJS4rjO0HxeU6MtJi8G3IGTLrZKvrU5cj1X4wA4DJ9RBVLSAskCYKznIFX6gAF4a3Icz 17Wnk/8CJfWFJexmI6dib0V2o+euKZVOYzGBk=
- In-reply-to: <110512102212.ZM13868@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BANLkTi=9r5811hh+qnVU29x0goODq0G9DA@mail.gmail.com> <110512101422.ZM13822@torch.brasslantern.com> <110512102212.ZM13868@torch.brasslantern.com>
On 12 May 2011 19:22, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author