mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 00:01:15 -03:00
reader handle_completions(): don't consider odd replacing completions for common prefix
If "will_replace_token" is set, we generally only consider
appending completions. This changed in commit 656b39a0b3 (Also show
case-insensitive prefix matches in completion pager, 2025-11-23) which
also allowed icase completions as long as they are also prefix matches.
Such replacing completions might cause the common prefix to be empty,
which breaks the appending completions.
Fix this by not considering these replacing completions for the
common-prefix computation. The pager already doesn't show the prefix
for these completions specifically.
Fixes #12249
This commit is contained in:
@@ -36,3 +36,18 @@ tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 1> echo $FISH_TEST_VAR_
|
||||
# CHECK: $FISH_TEST_VAR_1 (Variable: /) $FISH_TEST_VAR_2 (Variable: /)
|
||||
|
||||
mkdir -p clang/include
|
||||
touch clang/INSTALL.txt
|
||||
isolated-tmux send-keys C-u ': clang/in' Tab
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 1> : clang/include/
|
||||
# CHECK: clang/INSTALL.txt …/
|
||||
|
||||
mkdir -p clang/include-2
|
||||
isolated-tmux send-keys C-u ': clang/in' Tab
|
||||
tmux-sleep
|
||||
isolated-tmux capture-pane -p
|
||||
# CHECK: prompt 1> : clang/include
|
||||
# CHECK: clang/INSTALL.txt …/include/ …/include-2/
|
||||
|
||||
Reference in New Issue
Block a user