Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
26bef094
Commit
26bef094
authored
Aug 10, 2016
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Readme to pj plugin
parent
525ee508
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
README.md
plugins/pj/README.md
+45
-0
No files found.
plugins/pj/README.md
0 → 100644
View file @
26bef094
# pj
The
`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
](
https://github.com/DefV
)
)
Source: https://gist.github.com/pjaspers/368394#gistcomment-1016
## Usage
1.
Enable the
`pj`
plugin:
```
zsh
plugins
=(
... pj
)
```
2. Set
`
$PROJECT_PATHS
`
in
your ~/.zshrc:
```
zsh
PROJECT_PATHS
=(
~/src ~/work ~/
"dir with spaces"
)
```
You can now use one of the following commands:
##### `pj my-project`:
`
cd
`
to the directory named
"my-project"
found
in
one of the
`
$PROJECT_PATHS
`
directories. If there are several directories named the same, the first one
to appear
in
`
$PROJECT_PATHS
`
has preference.
For example:
```
zsh
PROJECT_PATHS=(~/code ~/work)
$ ls ~/code # ~/code/blog ~/code/react
$ ls ~/work # ~/work/blog ~/work/project
$ pj blog # <-- will cd to ~/code/blog
```
##### `pjo my-project`
Open the project directory with your defined
`$EDITOR`
. This follows the same
directory rules as the
`pj`
command above.
Note:
`pjo`
is an alias of
`pj open`
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment