From: Marlon Richert <marlon.richert@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>,
Zsh hackers list <zsh-workers@zsh.org>
Subject: [BUG] COMPLETE_IN_WORD fails to recognize brace_parameter context
Date: Fri, 7 May 2021 17:08:11 +0300 [thread overview]
Message-ID: <CAHLkEDsH+a4vRXsgoZkuPEd1Yqjnd66Jj7JMQmmwhMJz8g+q6Q@mail.gmail.com> (raw)
In-Reply-To: <1857440792.3267285.1611587238431@mail2.virginmedia.com>
This bug is similar to the one I reported in workers/47858.
This works correctly:
% setopt completeinword
% tst() { print "\n$compstate[context]"; zle -I }
% # place cursor after '${(' and press Tab:
% : ${(foo
brace_parameter
% foo=( ${(
brace_parameter
% foo=${(
brace_parameter
% [[ ${(foo ]]
brace_parameter
But if you've already typed more and you want to add parameter flags
later on, $compstate[context] is no longer accurate:
% # place cursor after '${(' and press Tab:
% : ${()foo}
command
% foo=( ${( )
array_value
% foo=${()bar}
value
% [[ ${()foo} ]]
condition
This matters when using the _prefix completer. I would expect to get
parameter flag completions for the cases above. But because
$compstate[context] does not equal 'brace_parameter', _complete will
never call _brace_parameter.
next prev parent reply other threads:[~2021-05-08 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 14:37 Bug report: Completion for dynamically named dirs fails when $SUFFIX is not empty Marlon Richert
2021-01-25 15:07 ` Peter Stephenson
2021-03-31 8:10 ` Marlon Richert
2021-03-31 8:25 ` Peter Stephenson
2021-03-31 8:29 ` Marlon Richert
2021-03-31 8:37 ` Marlon Richert
2021-03-31 8:56 ` Peter Stephenson
2021-05-07 14:08 ` Marlon Richert [this message]
2021-05-08 0:04 ` [BUG] COMPLETE_IN_WORD fails to recognize brace_parameter context Bart Schaefer
2021-05-08 13:04 ` Marlon Richert
2021-05-08 4:37 ` Bart Schaefer
2023-02-22 11:55 ` Bug report: Completion for dynamically named dirs fails when $SUFFIX is not empty Marlon Richert
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=CAHLkEDsH+a4vRXsgoZkuPEd1Yqjnd66Jj7JMQmmwhMJz8g+q6Q@mail.gmail.com \
--to=marlon.richert@gmail.com \
--cc=p.w.stephenson@ntlworld.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).