diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh index cfc60e818e4..8a77047c401 100644 --- a/shell/key-bindings.zsh +++ b/shell/key-bindings.zsh @@ -103,7 +103,7 @@ fzf-history-widget() { local ret=$? if [ -n "$selected" ]; then num=$(awk '{print $1}' <<< "$selected") - if [[ "$num" =~ ^[0-9]+$ ]]; then + if [[ "$num" =~ ^[1-9][0-9]*$ ]]; then zle vi-fetch-history -n $num else # selected is a custom query, not from history LBUFFER="$selected"