Hacker News new | ask | show | jobs
by Zababa 631 days ago
fzf (https://github.com/junegunn/fzf) is really great. Very useful for providing a quick and easy user interface. For example, I use it to fuzzy find inside git branches to have an "improved checkout". I do that since at work branches are usually named "<project>-<issue number>", it's faster to search for the issue number.
1 comments

I do this too!

    function zg --argument branch
        if test "$branch" = -
            git switch -
        else
            git checkout (git branch --list | fzf --query $branch --select-1 --exit-0 | string trim)
        end
    end