diff --git a/shells/zsh/includes/keybindings.zsh b/shells/zsh/includes/keybindings.zsh index bb3e48ee..bee2ee7d 100644 --- a/shells/zsh/includes/keybindings.zsh +++ b/shells/zsh/includes/keybindings.zsh @@ -164,7 +164,7 @@ find_current_file(){ return 0 fi # Next try locate with an exact filename match - filepath="$(locate "*/$lastWord")" + filepath="$(locate "*/$lastWord" | sed -n 1p)" if [ "$?" -eq 0 ]; then tokens[-1]="$filepath" LBUFFER="${tokens[@]}"