diff options
Diffstat (limited to 'functions')
| -rwxr-xr-x | functions/fzf.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/functions/fzf.sh b/functions/fzf.sh index 8761247..e806da1 100755 --- a/functions/fzf.sh +++ b/functions/fzf.sh @@ -7,11 +7,12 @@ function frg { --delimiter ':' \ --preview "bat --color=always {1} --theme='gruvbox-dark' --highlight-line {2}" \ --preview-window 'up,60%,border-bottom,+{2}+3/3,~3') - file=${result%%:*} - linenumber=$(echo "${result}" | cut -d: -f2) - if [[ -n "$file" ]]; then - nvim +"${linenumber}" "$file" - fi + + file=${result%%:*} + linenumber=$(echo "${result}" | cut -d: -f2) + if [[ -n "$file" ]]; then + nvim +"${linenumber}" "$file" + fi } alias rgf=frg |
