diff --git a/src/strategies/match_prev_cmd.zsh b/src/strategies/match_prev_cmd.zsh index b709783..a2a852f 100644 --- a/src/strategies/match_prev_cmd.zsh +++ b/src/strategies/match_prev_cmd.zsh @@ -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 diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index b19cac7..08a399f 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -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