From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21888 invoked by alias); 2 Feb 2015 17:15:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34452 Received: (qmail 23583 invoked from network); 2 Feb 2015 17:15:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=PYxIXZlY c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=0HtSIViG9nkA:10 a=e26yfrhv0_jPNXLDuKMA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150202091539.ZM31856@torch.brasslantern.com> Date: Mon, 02 Feb 2015 09:15:39 -0800 In-reply-to: Comments: In reply to "Jun T." "zsh - dose not use menu completion" (Feb 2, 10:56pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: zsh - dose not use menu completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 2, 10:56pm, Jun T. wrote: } Subject: zsh - dose not use menu completion } } if I type 'ls -' then it goes into the menu completion. But } for 'zsh -' or 'zsh --a' automenu does not work. [...] } If I replace } _arguments -S -s -- '*:' (line 27 of _sh) } by } _arguments -S -s -- } then 'zsh -^Xh' gives } options (_arguments _sh) # i.e., no argument-1 } and 'zsh -' works as expected without the zstyle above. } But I don't know why '*:' makes this difference. Doc says (last sentence of this paragraph): In addition to options, `_arguments --' will try to deduce the types of arguments available for options when the form `--OPT=VAL' is valid. It is also possible to provide hints by examining the help text of the command and adding HELPSPEC of the form `PATTERN:MESSAGE:ACTION'; note that other _arguments SPEC forms are not used. The PATTERN is matched against the help text for an option, and if it matches the MESSAGE and ACTION are used as for other argument specifiers. The special case of `*:' means both MESSAGE and ACTION are empty, which has the effect of causing options having no description in the help output to be ordered in listings ahead of options that have a description. With "zstyle ':completion:*:zsh:*' tag-order options" all the --optname options are listed *after* all the single-letter options. So there is something going on with the sort order that causes the menu not to be entered when the --optname list comes first.