darkrc/bin/find-git-project

9 lines
173 B
Bash
Executable File

#!/bin/sh
root=$1
shift 1
if [ -n "$*" ]
then find $root -type d -name .git | xargs dirname | fzf -1 -q "$*"
else find $root -type d -name .git | xargs dirname | fzf -1
fi