ZSH: make find file only give 1 result

这个提交存在于:
Jonathan Hodgson 2021-08-31 11:04:46 +01:00
父节点 fb3fb4365e
当前提交 ad9a516eb8

查看文件

@ -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[@]}"