blob: f12c3c2d68cee87e220b6733207629c11fbb910b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 %b%F{${coljobs:-white}}%1(j.[%j] .)%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
|