mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Make $key
in match_prev_cmd local
This commit is contained in:
parent
fcca87555f
commit
afee79ef5b
2 changed files with 2 additions and 0 deletions
|
@ -49,6 +49,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
|
|||
local prev_cmd="$(_zsh_autosuggest_escape_command "${history[$((HISTCMD-1))]}")"
|
||||
|
||||
# Iterate up to the first 200 history event numbers that match $prefix
|
||||
local key
|
||||
for key in "${(@)history_match_keys[1,200]}"; do
|
||||
# Stop if we ran out of history
|
||||
[[ $key -gt 1 ]] || break
|
||||
|
|
|
@ -711,6 +711,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
|
|||
local prev_cmd="$(_zsh_autosuggest_escape_command "${history[$((HISTCMD-1))]}")"
|
||||
|
||||
# Iterate up to the first 200 history event numbers that match $prefix
|
||||
local key
|
||||
for key in "${(@)history_match_keys[1,200]}"; do
|
||||
# Stop if we ran out of history
|
||||
[[ $key -gt 1 ]] || break
|
||||
|
|
Loading…
Reference in a new issue