From a62114c91f2070c8c8453d117f3d81dc113e41ff Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Mon, 25 Mar 2024 16:43:09 +0530 Subject: dotfile update --- zsh/oh-my-zsh/plugins/pj/README.md | 45 ---------------------------------- zsh/oh-my-zsh/plugins/pj/pj.plugin.zsh | 34 ------------------------- 2 files changed, 79 deletions(-) delete mode 100644 zsh/oh-my-zsh/plugins/pj/README.md delete mode 100644 zsh/oh-my-zsh/plugins/pj/pj.plugin.zsh (limited to 'zsh/oh-my-zsh/plugins/pj') diff --git a/zsh/oh-my-zsh/plugins/pj/README.md b/zsh/oh-my-zsh/plugins/pj/README.md deleted file mode 100644 index 27e5638..0000000 --- a/zsh/oh-my-zsh/plugins/pj/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# 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`. diff --git a/zsh/oh-my-zsh/plugins/pj/pj.plugin.zsh b/zsh/oh-my-zsh/plugins/pj/pj.plugin.zsh deleted file mode 100644 index 431576f..0000000 --- a/zsh/oh-my-zsh/plugins/pj/pj.plugin.zsh +++ /dev/null @@ -1,34 +0,0 @@ -alias pjo="pj open" - -function pj() { - local cmd="cd" - local project="$1" - - if [[ "open" == "$project" ]]; then - shift - project=$* - cmd=${=EDITOR} - else - project=$* - fi - - for basedir ($PROJECT_PATHS); do - if [[ -d "$basedir/$project" ]]; then - $cmd "$basedir/$project" - return - fi - done - - echo "No such project '${project}'." -} - -_pj () { - local -a projects - for basedir ($PROJECT_PATHS); do - projects+=(${basedir}/*(/N)) - done - - compadd ${projects:t} -} - -compdef _pj pj -- cgit v1.2.3-59-g8ed1b