zsh plugin to change directory to .repo repository root directory
Forked from cd-gitroot
Put cd-reporoot and _cd-reporoot files somewhere in your $fpath and add the following line to your .zshrc:
autoload -Uz cd-reporoot
# download all files
% cd /path/to/dir
% git clone https://github.com/P4Cu/cd-reporoot.git
And add the following lines to your .zshrc:
fpath=(/path/to/dir/cd-reporoot(N-/) $fpath)
autoload -Uz cd-reporoot
If you use Antigen, add the following line to your .zshrc:
antigen bundle P4Cu/cd-reporoot
If you use zgen, add the following to your .zshrc
zgen load mollifier/cd-reporoot
to your .zshrc
with your other zgen load
commands.
You can set alias to this function. e.g.
alias cdr='cd-reporoot'
cd-reporoot [PATH]
If PATH isn't specified, change directory to current .repo repository root directory. else change directory to PATH instead of it. PATH is treated relative path in git root directory.
-h display help and exit