summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zshrc')
-rwxr-xr-xzshrc32
1 files changed, 32 insertions, 0 deletions
diff --git a/zshrc b/zshrc
new file mode 100755
index 0000000..532c795
--- /dev/null
+++ b/zshrc
@@ -0,0 +1,32 @@
+#!/usr/bin/env zsh
+
+setopt +o NOMATCH # Non-existant wildcard matches won't produce an error
+
+# Zsh scripts (load general scripts, then host specific scripts, then scripts with ! prefix) (loaded later = higher priority)
+for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.zsh}; do source "$zscript"; done 2>/dev/null
+
+# Colors! + Prompt
+autoload -U colors && colors
+[ -z "$PS1OVERRIDE" ] && PS1="%B%F{${colbr:-red}}[%F{${colname:-yellow}}%n%F{${colat:-green}}@%F{${colhost:-blue}}%m %F{${coldir:-magenta}}%U%~%u%F{${colbr:-red}}]%f%b%(!.#.$) "
+
+# Cd settings
+setopt AUTO_CD # `cd` is implied when path is entered
+
+# History settings
+HISTFILE="${ZHISTFILE:-$HOME/.zhistory}"
+HISTSIZE=500 # Max lines of history loaded into memory for each zsh session
+SAVEHIST=10000000 # Max lines of history saved to HISTFILE before overwriting
+setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes when using INC_APPEND_HISTORY or SHARE_HISTORY
+setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored
+setopt HIST_IGNORE_SPACE # Entries with leading space aren't stored in histfile
+setopt HIST_REDUCE_BLANKS # Remove superfluous blank characters before saving
+setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits
+setopt SHARE_HISTORY # Share history between zsh sessions
+
+# Input/output settings
+setopt INTERACTIVE_COMMENTS # Comments won't be interpreted in an interactive shell
+
+# Disable bell
+unsetopt BEEP
+
+zplugInitialize # Load zsh plugins using zplug; goes last