Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] _expand completer's all-expansions tag format style does not expand %o
- X-seq: zsh-workers 39709
- From: Alex George <xzeroknightx@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [BUG] _expand completer's all-expansions tag format style does not expand %o
- Date: Wed, 19 Oct 2016 22:19:15 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=FCb1bMajPQ3ypVWKjBDBJrUcLm5cHkRF6vHRUagHmSU=; b=xAM2GUxf/aiG0yAsKOMgafvsYL94bICg36EGcBCNWxn2CC/jp1Oxg+2uMRdFDQeEgF IcCXD8nHrjQAbheQ2kmQkrEnm3tRk3vDQ8XPEZNifOjShBn+R+uTi8N3RM85/KVHJoZ3 DZi87OSTk5MssWVfwmatwAc+O4pqDZBI50Ow2Yvy0yua11PrlNMwXE96E4ViQ/eKtU0C IWN98NOyLcnmC3PjmP9+JQdayzOy0nIbaWqPoq3u9LJQ+ZUdr9rlvBrW2KEY71oTLDm7 g4t/sAkK5BhZXzSU3RFC9NDdBmnK1y9R8TsFxHZ5L/NKXzCWLE5YqAi651VE6F0wIXZC 1IXw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author