Skip to content

voronkovich/project.plugin.zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project.plugin.zsh

Tests

ZSH plugin for creating projects and navigating between them.

Installation

antigen bundle voronkovich/project.plugin.zsh
zplug "voronkovich/project.plugin.zsh"
git clone https://github.com/voronkovich/project.plugin.zsh ~/.oh-my-zsh/custom/plugins/project

Edit .zshrc to enable the plugin:

plugins=(... project)

Manual

Clone this repo and add this into your .zshrc:

source path/to/cloned/repo/project.plugin.zsh

Usage

Plugin supports two types of projects:

  • regular projects are stored in the directory configured by the $PROJECTS environment variable (by default: ~/projects);
  • temporary projects are stored in the one of the /tmp's subdirectory (see $PROJECTS_TMP).

To create a new regular project or open the existing one, just type a p command:

$ p project-name

To create a temporary project use a -t option:

$ p -t project-name

Some usefull shortcuts:

# You can provide an url to the project repo as a second argument. The repo will be cloned automatically
$ p awesome-zsh-plugins https://github.com/unixorn/awesome-zsh-plugins

# Or just type
$ p https://github.com/unixorn/awesome-zsh-plugins 

Recipes

Recipe is a piece of code that executes automaically after the project was created. All recipes are located in the directory configured by the $PROJECTS_RECIPES environment variable (by default: ~/projects/.recipes). Typical recipe could look like this:

#!/usr/bin/env zsh
# ~/proects/.recipes/wordpress

wget https://wordpress.org/latest.zip && unzip latest.zip -d . && rm latest.zip

In order to run a recipe you should specify it's name by using an -r option:

$ p -tr wordpress wpblog 

For more examples see my recipes.

Hashes

Plugin defines two usefull hashes: ~p for a directory with regular projects and ~pt for a directory with temporary projects. You can use them like this:

$ cp ~p/project1/README.md ~pt/project2

License

Copyright (c) Voronkovich Oleg. Distributed under the MIT.

About

ZSH plugin for creating projects and navigating between them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages