blob: 1cf9e591c5e984a63418de898c239f953ebc8feb (
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
|
#!/usr/bin/env zsh
# Zsh scripts
unsetopt nomatch # Disable error message when no files can be found
for zscript in "$XDG_CONFIG_HOME/zsh/zscripts"{/[^\!]*.zsh,/hosts/*.$HOST.zsh,/!*.zsh}; do source "$zscript"; done
# Colors! + Prompt
autoload -U colors && colors
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%(!.#.$) "
# History settings
HISTFILE="$ZDATADIR/zhistory"
HISTSIZE=500 # Max lines of history loaded into memory
SAVEHIST=10000000 # Max lines of history saved to the histfile
setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits
setopt SHARE_HISTORY # Share history between zsh sessions
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored
setopt HIST_IGNORE_SPACE # Entries with leading space ignored
setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes
# Other settings
setopt autocd # 'cd' is implied
# 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
zplugInitialize # Load zsh plugins using zplug; should be last
|