├── .gitignore ├── LICENSE ├── README.md ├── _zgen └── zgen.zsh /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !LICENSE 4 | !README.md 5 | !_zgen 6 | !zgen.zsh 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Eero-Antero Säisä 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## zgen 2 | 3 | A lightweight plugin manager for Zsh inspired by [Antigen](https://github.com/zsh-users/antigen). Keep your `.zshrc` clean and simple. 4 | 5 | Zgen provides you a few simple commands for managing plugins. It installs your plugins and generates a static init script that will source them for you every time you run the shell. We do this to save some startup time by not having to execute time consuming logic (plugin checking, updates, etc). This means that you have to manually check for updates (`zgen update`) and reset the init script (`zgen reset`) whenever you add or remove plugins. 6 | 7 | The motive for creating zgen was to have plugins quickly installed on a new machine without getting the startup lag that Antigen used to give me. 8 | 9 | ## Installation 10 | 11 | Clone the zgen repository 12 | 13 | git clone https://github.com/tarjoilija/zgen.git "${HOME}/.zgen" 14 | 15 | Edit your .zshrc file to load zgen 16 | 17 | # load zgen 18 | source "${HOME}/.zgen/zgen.zsh" 19 | 20 | Place the following code after the one above to load oh-my-zsh for example, see Usage for more details 21 | 22 | # if the init script doesn't exist 23 | if ! zgen saved; then 24 | 25 | # specify plugins here 26 | zgen oh-my-zsh 27 | 28 | # generate the init script from plugins above 29 | zgen save 30 | fi 31 | 32 | ## Usage 33 | 34 | ### oh-my-zsh 35 | 36 | This is a handy shortcut for installing oh-my-zsh plugins. They can be loaded using `zgen load` too with a significantly longer format. 37 | #### Load oh-my-zsh base 38 | It's a good idea to load the base components before specifying any plugins. 39 | 40 | zgen oh-my-zsh 41 | 42 | #### Load oh-my-zsh plugins 43 | 44 | zgen oh-my-zsh 45 | 46 | #### Example 47 | 48 | zgen oh-my-zsh 49 | zgen oh-my-zsh plugins/git 50 | zgen oh-my-zsh plugins/sudo 51 | zgen oh-my-zsh plugins/command-not-found 52 | zgen oh-my-zsh themes/arrow 53 | 54 | ### Prezto 55 | 56 | #### Load Prezto 57 | 58 | zgen prezto 59 | 60 | This will create a symlink in the `ZSHDOT` or `HOME` directory. This is needed by prezto. 61 | 62 | #### Load prezto plugins 63 | 64 | zgen prezto 65 | 66 | This uses the Prezto method for loading modules. 67 | 68 | #### Load a repo as Prezto plugins 69 | 70 | zgen pmodule 71 | 72 | This uses the Prezto method for loading the module. It creates a symlink and calls `pmodule`. 73 | 74 | #### Set prezto options 75 | 76 | zgen prezto