refactor(fzf): open vim only if result is not empty

This commit is contained in:
Stefan Imhoff
2022-07-12 21:17:55 +02:00
parent 32a286577c
commit c5da5d4b9b

5
zshrc
View File

@@ -186,7 +186,10 @@ fdr() {
# Find in files with ripgrep and fzf
frg() {
file=$(rg . --line-number | fzf | cut -d: -f1 -f2)
nvim $file
if [ "$file" != "" ]
then
nvim $file
fi
}
# fkill - kill process