From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: completion within comment with interactivecomments
Date: Fri, 23 Feb 2018 00:44:41 +0100 [thread overview]
Message-ID: <b10c7c23-afad-ca38-1246-562327deafd2@thequod.de> (raw)
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
reply other threads:[~2018-02-22 23:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=b10c7c23-afad-ca38-1246-562327deafd2@thequod.de \
--to=genml+zsh-workers@thequod.de \
--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).