EnrolZSH is a dead simple zsh script, which provides you with simple deployment commands.
With the first release we introduce autoloading for specific projects. The commands are stored inside the project folder itself (enrol/deploy.zsh
). This allows you do store all commands inside version control and makes sure all your coworkers are running the same script.
In the next version we will improve this and ship some predefined commands. We'll also allow configuration on project basis. This will remove a lot of complexitity for the developer.
~/.oh-my-zsh/plugins/
~/.zshrc
.
plugins=(git enrolzsh)
~/.oh-my-zsh/plugins/enrolzsh/.enrolzsh_global
.ENROL_PROJECT_DIR
enrol
folder inside every project you create.deploy.zsh
file inside the created enrol
folder an add all your scripts there. A boilerplate is linked here: EnrolZSH Project Boilerplate.enrolzsh_global
, like this: test="~/Projects/public/test"
ER_AUTOLOAD
Enrol supports Linux and MacOS. Windows works mostly iniside it's Unix subsystem, but is not tested and will fall short on certain commands like enrol.finder
.
When providing a custom enrol script inside the enrol
-directory make sure to prefix variables when using so. Enrol will load your script inside the global context and this has potential for dramatic issues.
Make use of the great gloabing feature inside ZSH by making use of enr
and
enrol
: Welcome screen
enrol --version
: Get installed version
enrol --help
: Help screen
enrol --update
: Update enrol when via git, just works when you've cloned the enrolzsh.
enrol.projects
: Loads all projects from the main project folder (defined inside the global settings) into the namespace.
After this command it's possible to call the project via enrol.PROJECT (PROJECT = Folder name without TLD, if you used any). If you have a script called deploy.zsh
inside the project it will also work during runtime. This command will do the same as autoload, but only at runtime of the terminal.
enrol.base
: Return to configured base path.
enrol.reload
: Reload zsh config - important after adjusting global config.
To make it easier for you to grasp all available project right of the but. Every autoloaded project will be accessible under enrol.PREFIX
and will direct to the root directory of the project. Just type enrol.
+ TAB for autocompletion and search for your project.
Some shorthands for vagrant inside the defined VM folder:
enrol.vu
: vagrant upenrol.vh
: vagrant haltenrol.vr
: vagrant reloadenrol.vs
: vagrant sshenrol.vb
: vagrant box updateHelper functions:
enrol.helper.finder
: Open current directory in finderConfig functions:
enrol.config.global
: Edit global settings directly in CMD (Nano)enrol.config.finder
: Open finder inside enrolzsh plugin directory (MacOS)