mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-05 13:48:21 -05:00
15 lines
309 B
Plaintext
15 lines
309 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
choice=$(rg --color=always -n "$1" 2> /dev/null |
|
||
|
fzf -d: \
|
||
|
--ansi \
|
||
|
--query="$1" \
|
||
|
--disabled \
|
||
|
--no-multi \
|
||
|
--preview='bat --color=always --style=header,numbers -H {2} {1} | grep -C3 {q}')
|
||
|
|
||
|
line=$(echo "$choice" | cut -d':' -f2)
|
||
|
file=$(echo "$choice" | cut -d':' -f1)
|
||
|
|
||
|
nvim +"$line" "$PWD/$file"
|