mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
Fix regression spuriously expanding abbr with cursor outside token
Given "abbr foo something", the input sequence
foo<space><ctrl-z><space>
would re-expand the abbreviation on the second space which is surprising
because the cursor is not at or inside the command token. This looks to be
a regression from 00432df42 (Trigger abbreviations after inserting process
separators, 2024-04-13)
Happily, 69583f303 (Allow restricting abbreviations to specific commands
(#10452), 2024-04-24) made some changes that mean the bad commit seems no
longer necessary. Not sure why it works but I'll take it.
This commit is contained in:
@@ -24,6 +24,11 @@ isolated-tmux send-keys abbr-test Space C-z arg2 Enter
|
||||
tmux-sleep
|
||||
# CHECK: prompt {{\d+}}> abbr-test arg2
|
||||
|
||||
# Same with a redundant space; it does not expand abbreviations.
|
||||
isolated-tmux send-keys C-u abbr-test Space C-z Space arg2 Enter
|
||||
tmux-sleep
|
||||
# CHECK: prompt {{\d+}}> abbr-test arg2
|
||||
|
||||
# Or use Control+Space ("bind -k nul") to the same effect.
|
||||
isolated-tmux send-keys abbr-test C-Space arg3 Enter
|
||||
tmux-sleep
|
||||
|
||||
Reference in New Issue
Block a user