Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
completion within comment with interactivecomments
- X-seq: zsh-workers 42388
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: completion within comment with interactivecomments
- Date: Fri, 23 Feb 2018 00:44:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-language:content-type :content-type:mime-version:user-agent:date:date:message-id :subject:subject:from:from:received:received; s=postfix2; t= 1519343082; bh=W5huaCZHG3dmlYAD42JzcmawJ8IlSU0+gGgrdpV8D30=; b=n Hm+QwhFe76vX/HabV+UEjhmcH3dPsjW4VYmuT7O78t8c1BY3MTIHDVn7DBW/nzyJ 0XOrbn027tC3LA7cV+ULICXsTDSzSSCP8Lthhrf4iDKXctW/79cju/v6wuT0tY2e VeAR4mUHeeInMAh7C/bjI7A5jHx4BOUKSdPH7/vCjg=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author