Summary
The information in this document should help you get started using zsh with some common plugins.
Installation
We are going to install zsh and zplug. zplug will help you install and manage zsh plugins.
sudo apt install zsh zplug
Configuration
zsh configuration file is named .zshrc and is located in your home directory (eg. ~/.zshrc)
If you run zsh without having the configuration file, zsh will provide you option to create one. I suggest to create basic .zshrc before you run zsh.
The following configuration file will help you get started.
Create ~/.zshrc with the following content:
# Set path if required #export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH # Aliases alias ls='ls --color=auto' alias ll='ls -lah --color=auto' alias grep='grep --color=auto' alias ec="$EDITOR $HOME/.zshrc" # edit .zshrc alias sc="source $HOME/.zshrc" # reload zsh configuration # Set up the prompt - if you load Theme with zplugin as in this example, this will be overriden by the Theme. If you comment out the Theme in zplugins, this will be loaded. autoload -Uz promptinit promptinit prompt adam1 # see Zsh Prompt Theme below # Use vi keybindings even if our EDITOR is set to vi bindkey -e setopt histignorealldups sharehistory # Keep 5000 lines of history within the shell and save it to ~/.zsh_history: HISTSIZE=5000 SAVEHIST=5000 HISTFILE=~/.zsh_history # Use modern completion system autoload -Uz compinit compinit # zplug - manage plugins source /usr/share/zplug/init.zsh zplug "plugins/git", from:oh-my-zsh zplug "plugins/sudo", from:oh-my-zsh zplug "plugins/command-not-found", from:oh-my-zsh zplug "zsh-users/zsh-syntax-highlighting" zplug "zsh-users/zsh-autosuggestions" zplug "zsh-users/zsh-history-substring-search" zplug "zsh-users/zsh-completions" zplug "junegunn/fzf" zplug "themes/robbyrussell", from:oh-my-zsh, as:theme # Theme # zplug - install/load new plugins when zsh is started or reloaded if ! zplug check --verbose; then printf "Install? [y/N]: " if read -q; then echo; zplug install fi fi zplug load --verbose
Start zsh
You should be able to start zsh by typing zsh in your current shell (e.g. bash). This will install and load all plugins included in the ~/.zshrc file.
zsh
Make zsh your default shell
chsh -s /bin/zsh
Reload zsh after changes
You can use the alias included in the config file sc or
source $HOME/.zshrc
Plugins for zplug
You can find different plugins or themes using these links.
Zplug management
You can check your current plugins, update them, or install new ones. Use the following options with zplug command.
zplug <option>
- check -- Return true if all packages are installed, false otherwise
- clean -- Remove repositories which are no longer managed
- clear -- Remove the cache file
- env -- [User-defined] The environment variables of zplug
- info -- Show the information such as the source URL and tag values for the given package
- install -- Install packages in parallel
- list -- List installed packages (more specifically, view the associative array $zplugs)
- load -- Source installed plugins and add installed commands to $PATH
- status -- Check if the remote repositories are up to date
- update -- Update installed packages in parallel
Zsh Prompt Theme
Zsh Resources
Resources specific to Debian's Zsh Package
Jenkins Autobuilder hosted by Grml using Jenkins Debian Glue
Packaging Workflow (incomplete)
Debian Zsh Packaging Team
aka pkg-zsh.
IRC: #pkg-zsh on OFTC
- The channel is bi-lingual English/German. Please state if you don't (or do) speak German, we will switch the currently spoken language promptly.
Team Mailing List: Archive, Subscribe/Unsubscribe