ZSH: make find file only give 1 result
This commit is contained in:
parent
fb3fb4365e
commit
ad9a516eb8
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue