mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Merge pull request #267 from isaacwhanson/fixes/match_prev_cmd_special_chars
escape pattern-matching chars on $prefix for match_prev_cmd strategy
This commit is contained in:
commit
ae4c344e82
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
|
|||
# Get all history event numbers that correspond to history
|
||||
# entries that match pattern $prefix*
|
||||
local history_match_keys
|
||||
history_match_keys=(${(k)history[(R)$prefix*]})
|
||||
history_match_keys=(${(k)history[(R)${(b)prefix}*]})
|
||||
|
||||
# By default we use the first history number (most recent history entry)
|
||||
local histkey="${history_match_keys[1]}"
|
||||
|
|
|
@ -533,7 +533,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
|
|||
# Get all history event numbers that correspond to history
|
||||
# entries that match pattern $prefix*
|
||||
local history_match_keys
|
||||
history_match_keys=(${(k)history[(R)$prefix*]})
|
||||
history_match_keys=(${(k)history[(R)${(b)prefix}*]})
|
||||
|
||||
# By default we use the first history number (most recent history entry)
|
||||
local histkey="${history_match_keys[1]}"
|
||||
|
|
Loading…
Reference in a new issue