Skip to content

zsh plugin to cd to git repository root directory.

License

Notifications You must be signed in to change notification settings

P4Cu/cd-reporoot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cd-reporoot

Synopsis

zsh plugin to change directory to .repo repository root directory

Forked from cd-gitroot

How to set up

Manually install

Put cd-reporoot and _cd-reporoot files somewhere in your $fpath and add the following line to your .zshrc:

autoload -Uz cd-reporoot

For example

# 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

Installing using Antigen

If you use Antigen, add the following line to your .zshrc:

antigen bundle P4Cu/cd-reporoot

Installing using Zgen

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'

Usage

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.

Options

-h display help and exit

About

zsh plugin to cd to git repository root directory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%