ZSH: make find file only give 1 result

master
Jonathan Hodgson 3 years ago
parent fb3fb4365e
commit ad9a516eb8
  1. 2
      shells/zsh/includes/keybindings.zsh

@ -164,7 +164,7 @@ find_current_file(){
return 0 return 0
fi fi
# Next try locate with an exact filename match # Next try locate with an exact filename match
filepath="$(locate "*/$lastWord")" filepath="$(locate "*/$lastWord" | sed -n 1p)"
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
tokens[-1]="$filepath" tokens[-1]="$filepath"
LBUFFER="${tokens[@]}" LBUFFER="${tokens[@]}"

Loading…
Cancel
Save