Skip to content

Commit

Permalink
Merge pull request #5 from TeddyDD/fix-grep-on-fish
Browse files Browse the repository at this point in the history
grep: force sh to be used for fzf preview command
  • Loading branch information
kkga authored Nov 12, 2021
2 parents cb1d21f + 95d5f74 commit df89306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/kks-grep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ history_file="$HOME/.cache/kks-grep-history"

[ -f "$history_file" ] || touch "$history_file"

rg --vimgrep '.+' "$@" |
SHELL=sh rg --vimgrep '.+' "$@" |
fzf -d ':' --height 100% --prompt 'grep> ' --history="$history_file" \
--preview='range="$(echo {2}-5 | bc | sed "s/^-.*/0/"):$(echo {2}+20 | bc)"; bat -r "$range" -n --color always -H {2} {1}' |
awk -F':' '{print $1 " " "+" $2 ":" $3 }' |
Expand Down

0 comments on commit df89306

Please sign in to comment.