imakira
Re:Ask HN: Could you share your personal website here?
on Wednesday January 14, 2026 @01:46PM (#46620604)
Re:Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
on Thursday November 30, 2023 @12:23PM (#38476139)
Thanks for the great information!
Re:Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
on Thursday November 30, 2023 @11:36AM (#38475568)
Thanks! I have tried using bash substitution to solve it but failed (I just learned the difference between "#" and "##").
Re:Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
on Thursday November 30, 2023 @08:53AM (#38473516)
I wrote a bash version of this:
function frg {
result=`rg --ignore-case --color=always --line-number --no-heading "$@" |
fzf --ansi \
--color 'hl:-1:underline,hl+:-1:underline:reverse' \
--delimiter ':' \
--preview "bat --color=always {1} --theme='Solarized (light)' --highlight-line {2}" \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'`
file="${result%%:*}"
linenumber=`echo "${result}" | cut -d: -f2`
if [ ! -z "$file" ]; then
$EDITOR +"${linenumber}" "$file"
fi
}Yeah it's like cheating, and I cheat myself by thinking O2 can exchange through sand :D