From 2dc486fb891e65658dff83ab34ca8878756a6a90 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 18 Oct 2024 21:52:28 -0500 Subject: initial commit --- zshrc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 zshrc (limited to 'zshrc') 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 -- cgit v1.2.3