diff --git a/bin/find_git_project b/bin/find_git_project index 251152c..1053830 100755 --- a/bin/find_git_project +++ b/bin/find_git_project @@ -1,3 +1,8 @@ #!/bin/sh -find $1 -type d -name .git | xargs dirname | fzf +root=$1 +shift 1 +if [ -n "$*" ] + then find $root -type d -name .git | xargs dirname | fzf -q "$*" + else find $root -type d -name .git | xargs dirname | fzf +fi diff --git a/shell/alias b/shell/alias index 1597cf2..201c4d7 100644 --- a/shell/alias +++ b/shell/alias @@ -20,7 +20,9 @@ alias setclip='xclip -selection c' alias tmux='tmux -2' alias w='watch -t -d -n 1' alias wmu='wake-me-up' -alias pp='cd $(find_git_project $HOME/workspace)' +pp() { + cd $(find_git_project $HOME/workspace "$@") +} # Funny alias please='sudo'