zsh-workers
 help / color / mirror / code / Atom feed
From: Alex George <xzeroknightx@gmail.com>
To: zsh-workers@zsh.org
Subject: [BUG] _expand completer's all-expansions tag format style does not expand %o
Date: Wed, 19 Oct 2016 22:19:15 +0000	[thread overview]
Message-ID: <CANKG6XqAmBFKHbmWjCGyNyXhU129p7eHLaF0oV9Ebk-a7=tmjw@mail.gmail.com> (raw)

[-- 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

             reply	other threads:[~2016-10-23  0:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 22:19 Alex George [this message]
2016-10-23  4:46 ` Bart Schaefer
2016-10-23 10:27   ` Daniel Shahaf
2016-10-23 16:34     ` Bart Schaefer

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='CANKG6XqAmBFKHbmWjCGyNyXhU129p7eHLaF0oV9Ebk-a7=tmjw@mail.gmail.com' \
    --to=xzeroknightx@gmail.com \
    --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).