dotfiles/zsh/zshrc.org

1.1 KiB

ZSH

Autoload any ZSH function from $HOME/.zsh/functions.

  fpath=($HOME/.zsh/functions $fpath)
  autoload -U $HOME/.zsh/functions/*(:t)

Use rlwrap on some less-than-pleasant REPLs that don't have GNU Readline-like features themselves.

  alias csi="rlwrap csi"
  alias scsh="rlwrap scsh"

Load zplug, a next generation zsh plugin manager.

  source /usr/share/zsh/scripts/zplug/init.zsh

Add zsh-syntax-highlighting.

  zplug "zsh-users/zsh-syntax-highlighting", nice:10

Add zsh-autosuggestions.

  zplug "zsh-users/zsh-autosuggestions"

Make sure all plugins are installed.

  if ! zplug check --verbose; then
      printf "Install? [y/N]: "
      if read -q; then
          echo; zplug install
      fi
  fi

Load all plugins.

  zplug load --verbose

Initialize completion. This triggers loading of zsh-syntax-highlighting as well.

autoload -Uz compinit
compinit