Skip to content

Latest commit

 

History

History
175 lines (116 loc) · 4.22 KB

README.md

File metadata and controls

175 lines (116 loc) · 4.22 KB

Zsh Configuration

GitHub releases GitHub license

Built from makenew.github.io.

Zsh configuration as a zplug plugin.

Description

This configuration system works as a meta-plugin: all desired Zsh plugins are loaded from packages.zsh using zplug. Overall configuration then follows a normal plugin structure.

Display documentation of this Zsh configuration with

$ man zshrc

Installation

Due to the bootstrapping problem, ZDOTDIR must be set on zsh initialization by adding the line

export ZDOTDIR=$HOME/.config/zsh

to either /etc/zsh/zshenv or ~/.zshenv.

Automatic Install

You can install this via the command-line with either curl

$ https://rc.evansosenko.com/zshrc/install.sh | sh

or wget

$ wget https://rc.evansosenko.com/zshrc/install.sh -O - | sh

Manual Install

  1. Install zplug.

  2. Create $ZDOTDIR/.zshrc with

    # rxrc/zshrc
    export ZSHRC_REPO=rxrc/zshrc
    
    export ZDOTDIR="${ZDOTDIR:-${XDG_CONFIG_HOME:-$HOME/.config}/zsh}"
    export ZPLUG_HOME="${ZPLUG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/zplug}"
    export ZPLUG_CACHE_DIR="${ZPLUG_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/zplug}"
    
    zplug_loadfile="${ZPLUG_HOME}/repos/rxrc/zshrc/packages.zsh"
    
    if [[ -e $zplug_loadfile ]]; then
      export ZPLUG_LOADFILE=$zplug_loadfile
    fi
    
    source "${ZPLUG_HOME}/init.zsh"
    
    if [[ ! -e $zplug_loadfile ]]; then
      zplug ${ZSHRC_REPO}
      zplug install
      export ZPLUG_LOADFILE=$zplug_loadfile
      source "${ZPLUG_HOME}/init.zsh"
    fi
    
    zplug ${ZSHRC_REPO}, use:env.zsh
    
    if ! zplug check; then
      zplug install
      echo '[zplug] Updating cache file: this may take up to a minute'
    fi
    
    zplug load
  3. Open a new terminal session and wait for the initial install to complete.

Updating

Updating is handled via the normal zplug commands.

The provided shell function zshupg performs a one-step update.

Development and Testing

Source Code

The zshrc source is hosted on GitHub. Clone the project with

$ git clone https://github.com/rxrc/zshrc.git

Local Development Mode

You can switch to development mode which will configure zplug to use the local directory as the plugin path.

First, follow the normal install steps if you haven't already. Then, switch to development mode with

$ ./install.sh dev

Optionally specify an existing branch to develop with

$ ./install.sh dev dev-branch

Switch out of development mode with

$ ./install.sh

Man Page

The man page is generated from doc/src/man1 using AsciiDoc with

$ a2x -f manpage -D doc/man/man1 doc/src/man1/*

Contributing

Please submit and comment on bug reports and feature requests.

To submit a patch:

  1. Fork it (https://github.com/rxrc/zshrc/fork).
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Make changes.
  4. Commit your changes (git commit -am 'Add some feature').
  5. Push to the branch (git push origin my-new-feature).
  6. Create a new Pull Request.

License

This Zsh configuration is licensed under the MIT license.

Warranty

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.