mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-02 04:08:30 -05:00
15 lines
309 B
Bash
Executable File
15 lines
309 B
Bash
Executable File
#!/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"
|