zsh-workers
 help / color / mirror / code / Atom feed
* Bug report: Completion for dynamically named dirs fails when $SUFFIX is not empty
@ 2021-01-21 14:37 Marlon Richert
  2021-01-25 15:07 ` Peter Stephenson
  0 siblings, 1 reply; 12+ messages in thread
From: Marlon Richert @ 2021-01-21 14:37 UTC (permalink / raw)
  To: Zsh hackers list

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

% cd $(mktemp -d)
% ZDOTDIR=$PWD HOME=$PWD zsh -f
% autoload -Uz compinit
% compinit
% zsh_directory_name() { [[ $1 == c ]] && compadd -S ']' foo }

Given the above setup, when


   1. $LBUFFER is `cd ~[` or `cd ~[fo`,
   2. $RBUFFER is empty, and
   3. I press ^I,
   4. then $LBUFFER becomes `cd ~[foo]`.




   1. $LBUFFER is `cd ~[`,
   2. $RBUFFER is `fo` or `]`, and
   3. I press ^I,
   4. then completion beeps and the buffer remains unchanged.


`functions -t _complete` shows that the problem is caused by
$compstate[context] becoming `tilde` instead of `subscript` as soon as
$SUFFIX is non-empty, which causes _complete() to not call _subscript(),
which is the only point of entry to _dynamic_directory_name().

[-- Attachment #2: Type: text/html, Size: 2739 bytes --]

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

end of thread, other threads:[~2023-02-22 11:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [BUG] COMPLETE_IN_WORD fails to recognize brace_parameter context Marlon Richert
2021-05-08  0:04     ` 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

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