Clean up comments in pj plugin file and reorganise
Diff
1diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh
2index 1572e9363402906636bcad77e77d61b103c77290..8b1bc883fa978902c1067b2a983d85aad3bd8ffb 100644
3--- a/plugins/pj/pj.plugin.zsh
4+++ b/plugins/pj/pj.plugin.zsh
5@@ -1,19 +1,6 @@
6-#!/bin/zsh
7-
8-#
9-# Original idea by DefV (Jan De Poorter)
10-# Source: https://gist.github.com/pjaspers/368394#comment-1016
11-#
12-# Usage:
13-# - Set `$PROJECT_PATHS` in your ~/.zshrc
14-# e.g.: PROJECT_PATHS=(~/src ~/work)
15-# - In ZSH you now can open a project directory with the command: `pj my-project`
16-# the plugin will locate the `my-project` directory in one of the $PROJECT_PATHS
17-# Also tab completion is supported.
18-# - `pjo my-project` will open the directory in $EDITOR
19-#
20+alias pjo="pj open"
2122-function pj() {
23+function pj () {
24 cmd="cd"
25 file=$1
2627@@ -36,8 +23,6 @@ function pj() {
28 echo "No such project $1"
29 }
3031-alias pjo="pj open"
32-
33 function _pj () {
34 # might be possible to improve this using glob, without the basename trick
35 typeset -a projects
36@@ -45,5 +30,4 @@ function _pj () {
37 projects=$projects:t
38 _arguments "*:file:($projects)"
39 }
40-
41 compdef _pj pj