summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2016-08-11 01:19:19 +0200
committerMarc Cornellà <marc.cornella@live.com>2016-08-16 08:32:43 +0200
commit26bef0942ba8acbe3ad2005500efd8f47e1edc36 (patch)
tree44308dfc2a5091e98970c4d7f49d16972656ac2c /plugins
parent525ee5081583f5c7681104d21796e35fe41afd5a (diff)
downloadzsh-26bef0942ba8acbe3ad2005500efd8f47e1edc36.tar.gz
zsh-26bef0942ba8acbe3ad2005500efd8f47e1edc36.tar.bz2
zsh-26bef0942ba8acbe3ad2005500efd8f47e1edc36.zip
Add Readme to pj plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pj/README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/pj/README.md b/plugins/pj/README.md
new file mode 100644
index 000000000..27e5638ec
--- /dev/null
+++ b/plugins/pj/README.md
@@ -0,0 +1,45 @@
+# 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`.