]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - zsh/rc
Update umask settings in zsh.
[config/dotfiles.git] / zsh / rc
diff --git a/zsh/rc b/zsh/rc
index 5d20a458d5855f1cb2ade92d5d94c16358444a04..76d0b29830b67ff65a72f58302025d5417a340d0 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -4,6 +4,9 @@
 # Use Vi(m) style key bindings.
 bindkey -v
 
+# Be paranoid, new files are readable/writable by me only.
+umask 077
+
 # Use history and store it in ~/.zsh/history.
 HISTSIZE=1000
 SAVEHIST=1000
@@ -29,8 +32,9 @@ setopt autocd
 # one.
 setopt correct
 
-# Use colorized output.
+# Use colorized output, necessary for prompts and completions.
 autoload -U colors && colors
+
 # Set the default prompt. The current host and working directory is displayed,
 # the exit code of the last command if it wasn't 0 and a + if this shell is
 # running inside another shell.
@@ -42,6 +46,9 @@ PROMPT="%{${fg[green]}%}%B%m%b%{${fg[default]}%}:\
 
 # Use new completion system.
 autoload -U compinit && compinit
+# Load the complist module which provides additions to completion lists
+# (coloring, scrollable).
+zmodload zsh/complist
 # Make sure the list of possible completions is displayed after pressing <TAB>
 # the first time.
 setopt nolistambiguous
@@ -57,6 +64,11 @@ zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
 zstyle ':completion:*:functions' ignored-patterns '_*'
 # Ignore parent directory.
 zstyle ':completion:*:(cd|mv|cp):*' ignore-parents parent pwd
+# Use ls like colors for completions.
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+# Make completion lists scrollable so "do you wish to see all n possibilities"
+# is no longer displayed.
+zstyle ':completion:*' list-prompt '%p'
 
 # Enable zsh's extended glob abilities.
 setopt extendedglob