summaryrefslogtreecommitdiff
path: root/zsh/zshrc
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2022-07-31 15:16:04 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2022-07-31 15:16:04 -0500
commita0943a0a387400afc8e49e7a626532e73990d24f (patch)
tree5e14f8a353c9b05a1a97f029c66c9f0e28f352a1 /zsh/zshrc
parent4af49ed67fbf358674d45fb8af3c4c3efaf90f58 (diff)
downloaddotconfig-a0943a0a387400afc8e49e7a626532e73990d24f.tar.xz
dotconfig-a0943a0a387400afc8e49e7a626532e73990d24f.zip
bunch more stuff
Diffstat (limited to 'zsh/zshrc')
-rwxr-xr-xzsh/zshrc17
1 files changed, 8 insertions, 9 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index bef8f9c..e57b70d 100755
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -1,6 +1,6 @@
#!/usr/bin/env zsh
-# Zsh scripts
+# Zsh scripts (load general scripts, then host specific scripts, then scripts prepended with !)
for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.zsh}; do source "$zscript"; done 2>/dev/null
# Colors! + Prompt
@@ -12,20 +12,19 @@ setopt AUTO_CD # `cd` is implied
#setopt CDABLE_VARS # '~/' is implied for `cd` (doesn't work?)
# History settings
-HISTSIZE=500 # Max lines of history loaded into memory
-SAVEHIST=10000000 # Max lines of history saved to the histfile
-setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes
+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 ignored
-setopt HIST_REDUCE_BLANKS
+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
-# Zsh completion settings
-setopt MENU_COMPLETE # Insert first option immediately in completion menu instead of just showing menu
-
# Input/output settings
-setopt INTERACTIVE_COMMENTS # Comments work as expected in interactive shell
+setopt INTERACTIVE_COMMENTS # Comments won't be interpreted in an interactive zsh session
+setopt +o NOMATCH # Non-existant wildcard matches won't produce an error
# tmp thing
[ $TTY = /dev/tty2 ] && "/home/timmy/.local/opt/shell-color-scripts/colorscripts/$(ls /home/timmy/.local/opt/shell-color-scripts/colorscripts 2>/dev/null | shuf -n1)" 2>/dev/null