mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
src/tokenizer: Add ":@" to the list of non-path-component chars
This makes kill-path-component stop there. Fixes #5841.
This commit is contained in:
parent
ebf1914a35
commit
009ecfd7e6
3 changed files with 20 additions and 1 deletions
|
@ -638,7 +638,7 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) {
|
|||
bool move_word_state_machine_t::is_path_component_character(wchar_t c) {
|
||||
// Always treat separators as first. All this does is ensure that we treat ^ as a string
|
||||
// character instead of as stderr redirection, which I hypothesize is usually what is desired.
|
||||
return tok_is_string_character(c, true) && !std::wcschr(L"/={,}'\"", c);
|
||||
return tok_is_string_character(c, true) && !std::wcschr(L"/={,}'\":@", c);
|
||||
}
|
||||
|
||||
bool move_word_state_machine_t::consume_char_path_components(wchar_t c) {
|
||||
|
|
|
@ -271,3 +271,20 @@ expect_prompt -re {ctrl-o seen} {
|
|||
} unmatched {
|
||||
puts stderr "ctrl-o not seen"
|
||||
}
|
||||
|
||||
# \x17 is ctrl-w.
|
||||
send "echo git@github.com:fish-shell/fish-shell"
|
||||
send "\x17\x17\r"
|
||||
expect_prompt -re {git@github.com:} {
|
||||
puts "ctrl-w stops at :"
|
||||
} unmatched {
|
||||
puts stderr "ctrl-w does not stop at :"
|
||||
}
|
||||
|
||||
send "echo git@github.com:fish-shell/fish-shell"
|
||||
send "\x17\x17\x17\r"
|
||||
expect_prompt -re {git@} {
|
||||
puts "ctrl-w stops at @"
|
||||
} unmatched {
|
||||
puts stderr "ctrl-w does not stop at @"
|
||||
}
|
||||
|
|
|
@ -20,3 +20,5 @@ emacs transpose words, 100ms timeout: short delay
|
|||
emacs transpose words, 100ms timeout: long delay
|
||||
ctrl-v seen
|
||||
ctrl-o seen
|
||||
ctrl-w stops at :
|
||||
ctrl-w stops at @
|
||||
|
|
Loading…
Reference in a new issue