Manual Installation

Sure you don’t want to use that install script? Ok then, here we go.

  1. First, set a couple of environment variables which specify the directories Zulu should use. Make sure to add them to your .zshrc if you change them from the default values below.

    export ZULU_DIR="~/.zulu"
    export ZULU_CONFIG_DIR="~/.config/zulu"
    
  2. Create the directories needed for packages.

    mkdir -p ${ZULU_DIR}/{bin,share,init,packages}
    touch ${ZULU_DIR}/{bin,share,init,packages}/.gitkeep
    
  3. Create the config directories.

    mkdir -p "${ZULU_CONFIG_DIR}/functions"
    
  4. Clone the core and index repositories.

    git clone https://github.com/zulu-zsh/zulu ${ZULU_DIR}/core
    git clone https://github.com/zulu-zsh/index ${ZULU_DIR}/index
    
  5. Create the pathfile, and store the contents of $path within it. We’ll add Zulu’s bin directory first, so that packages with executables can work.

    pathfile="${ZULU_CONFIG_DIR}/path"
    echo "${ZULU_DIR}/bin" > $pathfile
    for p in "${path[@]}"; do
     echo "$p" >> $pathfile
    done
    
  6. Create the fpathfile, and store the contents of $fpath within it. We’ll add Zulu’s share directory here, so that themes and autoloadable functions within packages can be loaded.

    pathfile="${ZULU_CONFIG_DIR}/fpath"
    echo "${ZULU_DIR}/share" > $pathfile
    for p in "${fpath[@]}"; do
     echo "$p" >> $pathfile
    done
    
  7. Create the cdpathfile, and store the contents of $cdpath within it.

    pathfile="${ZULU_CONFIG_DIR}/cdpath"
    echo "" > $pathfile
    for p in "${cdpath[@]}"; do
     echo "$p" >> $pathfile
    done
    
  8. Create the manpathfile, and store the contents of $manpath within it.

    pathfile="${ZULU_CONFIG_DIR}/manpath"
    echo "" > $pathfile
    for p in "${manpath[@]}"; do
     echo "$p" >> $pathfile
    done
    
  9. Create the aliasfile, and store all existing aliases within it.

    local aliasfile="${ZULU_CONFIG_DIR}/alias"
    echo "" > $aliasfile
    IFS=$'\n'; for a in `alias`; do
     echo "alias $a\n" >> $aliasfile
    done
    
  10. Build Zulu from its source

    cd ${ZULU_DIR}
    ./build.zsh
    
  11. Install the completion file for Zulu itself.

    ln -s ${ZULU_DIR}/core/zulu.zsh-completion ${ZULU_DIR}/share/_zulu
    
  12. Add Zulu’s initialisation script to your .zshrc.

    echo "# Initialise zulu plugin manager" >> ${ZDOTDIR:-$HOME}/.zshrc
    echo 'source "${ZULU_DIR:-"${ZDOTDIR:-$HOME}/.zulu"}/core/zulu"' >> ${ZDOTDIR:-$HOME}/.zshrc
    echo "zulu init" >> ${ZULU_DIR:-$HOME}/.zshrc
    
  13. Nearly done! Zulu is installed. Load it now.

    source ${ZULU_DIR:-"${ZDOTDIR:-$HOME}/.zulu"}/core/zulu
    zulu init
    
  14. Zulu uses a few packages from the index internally, if they are installed. For best results, install them now.

    zulu install color revolver