Hacker News new | ask | show | jobs
by booky2 1949 days ago
I use 'cz' which is like 'cd' but for git workspaces only. Uses fzf to present list of matches.

bash source:

cz-index () { sudo find -L ~/work -type d -name '.git' | sed 's;/.git$;;' | sort > ~/git-dirs.txt }

cz () { cd "$(cat ~/git-dirs.txt | fzf --tiebreak=begin --exact -i -q $1)" }