zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] _expand completer's all-expansions tag format style does not expand %o
@ 2016-10-19 22:19 Alex George
  2016-10-23  4:46 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Alex George @ 2016-10-19 22:19 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

I have found a bug with the _expand completer regarding the format style.
zshcompsys(1) states the following about the _expand completer:

    The format string for all-expansions and for expansions may contain the
    sequence `%o' which will be replaced by the original string from the
line.

However, the all-expansions tag does not actually expand %o unlike the
expansions tag. I am using zsh v5.2, but have confirmed the bug's presence
upstream as well. This behavior can be reproduced as follows:

* Include the _expand completer in your completer style
* bindkey '^I' complete-word
* zstyle ':completions:*:*expansions' format '>%d for [%o]'

% cd $(mktemp -d)
% touch foo bar
% print *<TAB>
>expansions for [*]
bar foo
>all-expansions for []
bar foo

I believe the problem is the lack of a

     _description all-expansions expl all-expansions "o:$word"

line in Completion/Base/Completer/_expand. I was able to fix the issue by
adding
that line under line 210 of the _expand completer, but I don't know enough
about the completion system guts to determine if this is the ideal solution
or
not.

I don't believe I have received a subscription confirmation email yet, so
would
you kindly CC replies to xzeroknightx [AT] gmail [DOT] com ?

Regards,
Alex George

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

end of thread, other threads:[~2016-10-23 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 22:19 [BUG] _expand completer's all-expansions tag format style does not expand %o Alex George
2016-10-23  4:46 ` Bart Schaefer
2016-10-23 10:27   ` Daniel Shahaf
2016-10-23 16:34     ` Bart Schaefer

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