pj plugin (short for
Project Jump) allows you to define several
folders where you store your projects, so that you can jump there directly
by just using the name of the project directory.
Original idea and code by Jan De Poorter (@DefV) Source: https://gist.github.com/pjaspers/368394#gistcomment-1016
$PROJECT_PATHSin your ~/.zshrc:
PROJECT_PATHS=(~/src ~/work ~/"dir with spaces")
You can now use one of the following commands:
cd to the directory named "my-project" found in one of the
directories. If there are several directories named the same, the first one
to appear in
$PROJECT_PATHS has preference.
PROJECT_PATHS=(~/code ~/work) $ ls ~/code # ~/code/blog ~/code/react $ ls ~/work # ~/work/blog ~/work/project $ pj blog # <-- will cd to ~/code/blog
Open the project directory with your defined
$EDITOR. This follows the same
directory rules as the
pj command above.
pjo is an alias of