When I installed arch Linux on my computer(at around April this year) I was looking for a simple shell with a few specific features like spelling correction of the recursive path listing. As my options I found fish and zsh. Since a friend showed my zsh with the oh-my-zsh framework, which was way to complex for my needs, and I did not know about the 'normal' way of zsh I used fish for around over half a year. But since fishs lacking POSIX compatibility I was quite often annoyed when trying to run a command found. Around a month ago I then switched to vanilla zsh.



One of my first issues was quite easy to solve. My .profile file was not read anymore since I installed it via pacman and set it as my default shell. I solved this issue by linking my .profile file to .zprofile

ln .profile .zprofile

Alternative config directory

The normal zsh configuration would be in .zshrc. Because I am a friend of putting all my configuration in ~/.config/ I looked for a way to move it. It turned out, that it is possible to set a environment variable for the zsh config directory in my .profile. The configuration file stays still .zshrc.

export ZDOTDIR="$HOME/.config/zsh"

General configuration

autoload -U colors && colors

Custom Prompt

My prompt looks around like this. (Of course with a different color sheet)

[dbauer@host ~/daten]$

PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "

Code and file completion

autoload -U compinit
zstyle ":completion:*" menu select
zmodload zsh/complist
_comp_options+=(globdots) #Include hidden files

Syntax highlighting

For syntax highlighting I use the plugin zsh-syntax-highlighting available under Arch Linux in pacman/community

Useful aliases

I found some quite useful aliases. I set an alias to connect to my vpn.

alias vpn-home="sudo openvpn --config .openvpn/config.ovpn"

Also I set a quite useful alias for my git branch

alias showBranch="git log --graph --decorate --oneline"

To have an quick and dirty clock in my terminal I have the following alias

alias clock="while true; do tput clear; date +'%H : %M : %S' | figlet ; sleep 1; done"

And last but definetly not least I set an alias to cp. Prppably there are people out there who would critisize it, but when I copy large directories I want to keep track of the progress. That's why I use rsync instead from now on.

 alias cp="rsync -ah --progress $1 $2"