From 973673083f215451b7674a22533b4e7dfdfb81fd Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Sun, 20 Apr 2025 15:46:33 -0400 Subject: maybe useful idk --- functions/fzf.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'functions') 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 -- cgit v1.2.3-70-g09d2