summaryrefslogtreecommitdiffstats
path: root/.local/bin/rfv
diff options
context:
space:
mode:
authorYigit Sever2021-11-07 23:42:15 +0300
committerYigit Sever2021-11-07 23:42:15 +0300
commit9fa9973c2d2f91cef7bdd26cb52064c13f4d682e (patch)
tree13aa64b09bc91e16f3dd3217bf3d647559af2cf9 /.local/bin/rfv
parent9382166b5522a5d9e2d62e93e702b4d0886cedb4 (diff)
parentfcb2237c01bcd2b7982bb844cea4cf9447f20d03 (diff)
downloaddotfiles-9fa9973c2d2f91cef7bdd26cb52064c13f4d682e.tar.gz
dotfiles-9fa9973c2d2f91cef7bdd26cb52064c13f4d682e.tar.bz2
dotfiles-9fa9973c2d2f91cef7bdd26cb52064c13f4d682e.zip
Merge remote-tracking branch 'origin/main'
Diffstat (limited to '.local/bin/rfv')
-rwxr-xr-x.local/bin/rfv12
1 files changed, 6 insertions, 6 deletions
diff --git a/.local/bin/rfv b/.local/bin/rfv
index 4c9a632..a178e67 100755
--- a/.local/bin/rfv
+++ b/.local/bin/rfv
@@ -4,11 +4,11 @@
4# 2. Interactively narrow down the list using fzf 4# 2. Interactively narrow down the list using fzf
5# 3. Open the file in Vim 5# 3. Open the file in Vim
6IFS=: read -ra selected < <( 6IFS=: read -ra selected < <(
7 rg --color=always --line-number --no-heading --smart-case "${*:-}" | 7 rg --color=always --line-number --no-heading --smart-case "${*:-}" \
8 fzf --ansi \ 8 | fzf --ansi \
9 --color "hl:-1:underline,hl+:-1:underline:reverse" \ 9 --color "hl:-1:underline,hl+:-1:underline:reverse" \
10 --delimiter : \ 10 --delimiter : \
11 --preview 'bat --color=always {1} --highlight-line {2}' \ 11 --preview 'bat --color=always {1} --highlight-line {2}' \
12 --preview-window='up:60%:+{2}+3/3:~3' 12 --preview-window='up:60%:+{2}+3/3:~3'
13) 13)
14[ -n "${selected[0]}" ] && nvim "${selected[0]}" "+${selected[1]}" 14[ -n "${selected[0]}" ] && nvim "${selected[0]}" "+${selected[1]}"