]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
zsh/rc: Add directory stack settings.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 37ca7a1f33e54f4914d188eedebc6760f701b837..f82abc75268ba2332901abcf196f5477e7c1a60d 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -140,6 +140,15 @@ bindkey -a '^P' history-beginning-search-backward # binding for Vi-mode
 # after calling ^P.
 bindkey -a '^N' history-beginning-search-forward
 
+# Automatically push cd-ed directories on the directory stack.
+setopt autopushd
+# Don't push duplicates on the directory stack.
+setopt pushdignoredups
+# Exchange the meaning of + and - when specifying a directory on the stack.
+# This way cd -<Tab> lists the last used directory first, which is more
+# natural because cd - goes to the last directory.
+setopt pushdminus
+
 
 # PROMPT SETTINGS
 
@@ -504,8 +513,9 @@ zstyle ':completion:*:*:-command-:*' ignored-patterns './config.*'
 
 # Don't complete unwanted files with Vim. Thanks to Nomexous in #zsh on
 # Freenode (2010-06-06 04:54 CEST). See below for a way to complete them.
-zstyle ':completion:*:*:vim:*:all-files' ignored-patterns '*.aux' '*.log' \
-                                                          '*.pdf' '*.class'
+zstyle ':completion:*:*:vim:*:all-files' ignored-patterns \
+    '*.aux' '*.log' '*.pdf' \
+    '*.class'
 
 # Provide a fallback completer which always completes files. Useful when Zsh's
 # completion is too "smart". Thanks to Frank Terbeck <ft@bewatermyfriend.org>