setopt incappendhistory
# If the same command is run multiple times store it only once in the history.
setopt histignoredups
+# Don't add lines starting with a space to the history.
+setopt histignorespace
# Vim like completions of previous executed commands (also enter Vi-mode). If
# called at the beginning it just recalls old commands (like cursor up), if
# called after typing something, only lines starting with the typed text are