Skip to content

Commit

Permalink
Merge pull request #8 from TeddyDD/grep-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga authored Nov 14, 2021
2 parents c81d3c1 + 772ef09 commit 1792cc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/kks-grep
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ history_file="$HOME/.cache/kks-grep-history"

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

SHELL=sh rg --vimgrep '.+' "$@" |
fzf -d ':' --height 100% --prompt 'grep> ' --history="$history_file" \
rg --vimgrep '.+' "$@" |
SHELL=sh 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 }' |
xargs -r kks edit

0 comments on commit 1792cc6

Please sign in to comment.