diff --git a/.zsh/functions/_gitcd b/.zsh/functions/_gitcd new file mode 100644 index 0000000..42f3956 --- /dev/null +++ b/.zsh/functions/_gitcd @@ -0,0 +1,3 @@ +#compdef gitcd + +_path_files -/ -W $(git root) diff --git a/.zsh/functions/gitcd b/.zsh/functions/gitcd index cfae756..efb4de3 100755 --- a/.zsh/functions/gitcd +++ b/.zsh/functions/gitcd @@ -1,3 +1,4 @@ #autoload -cd `git root` +root=$( git root ) +cd "$root/$1"