Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a fish version, and simplified it:

    function frg --description "rg tui built with fzf and bat"
        rg --ignore-case --color=always --line-number --no-heading "$argv" |
            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' \
                --bind "enter:become($EDITOR +{2} {1})"
    end
Still not a fan of the string-based injections based on the colon and newline characters, but all versions suffer from it. (also: nice that fzf does the right thing and prevents space and quote injection by default).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: