zsh-workers
 help / color / mirror / code / Atom feed
* completion within comment with interactivecomments
@ 2018-02-22 23:44 Daniel Hahler
  0 siblings, 0 replies; only message in thread
From: Daniel Hahler @ 2018-02-22 23:44 UTC (permalink / raw)
  To: Zsh hackers list

I've noticed that using completion after "#" with "setopt
interactivecomments" will always complete all executables, not taking
into account any prefixes.

% zsh -f
% autoload -U compinit
% compinit
% setopt interactivecomments
% foo # bar<TAB>
zsh: do you wish to see all X possibilities (Y lines)?

This is different with "git branch #<TAB>" however, which displays "--
no more arguments --".
Apparently this is coming from using _arguments?

I think the completion should either always complete nothing, or do
something smarter after comments, e.g. completing files/dirs only.

FWIW, using a custom compdef for "foo" gets not used.
That's what confused me, since "git branch" behaved different than my
function "gb" which uses a compdef to trigger _git_branch:

     compdef -e 'words=(git branch "${(@)words[2,-1]}"); ((CURRENT++));
_normal' gb


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-22 23:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 23:44 completion within comment with interactivecomments Daniel Hahler

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