zsh-workers
 help / color / mirror / code / Atom feed
* zsh -<TAB> dose not use menu completion
@ 2015-02-02 13:56 Jun T.
  2015-02-02 17:15 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Jun T. @ 2015-02-02 13:56 UTC (permalink / raw)
  To: zsh-workers

'zsh -<TAB>' does not work as I expect. With this simplest settings:

autoload -Uz compinit
compinit

if I type 'ls -<TAB><TAB>' then it goes into the menu completion. But
for 'zsh -<TAB><TAB>' or 'zsh --a<TAB><TAB>' automenu does not work.

I've tried a few other settings but I couldn't enable menu completion
for 'zsh -<TAB>'. For example, with the following settings,

zmodload zsh/complist
autoload -Uz compinit
compinit
zstyle ':completion:*' menu on select
zstyle ':completion:*' select-prompt ''    # may not be necessary

'ls -<TAB>' directly goes into the menu selection mode, but
'zsh -<TAB>' still just list the options and never goes into the menu
completion (or menu selection).


'zsh -^Xh' (_complete_help) gives

tags in context :completion::complete:zsh::
    all-files           (_files _default _sh) 
    argument-1 options  (_arguments _sh)
tags in context :completion::complete:zsh:argument-1:
    argument-1  (_message _arguments _sh)
tags in context :completion::complete:zsh:options:
    options  (_describe _arguments _sh

It seems
    argument-1 options  (_arguments _sh)
is causing the trouble, and If I specify

zstyle ':completion:*:zsh:*' tag-order options

then 'zsh -<TAB>' works as expected. Is this the only way to make menu
completion work for 'zsh -<TAB>'? If so, I feel it better to make it not
necessary for a user to specify this zstyle, but I don't know how to.


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 -<TAB>' works as expected without the zstyle above.
But I don't know why '*:' makes this difference.


Jun


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

end of thread, other threads:[~2015-02-03 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 13:56 zsh -<TAB> dose not use menu completion Jun T.
2015-02-02 17:15 ` Bart Schaefer
2015-02-03 12:02   ` Jun T.

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