aboutsummaryrefslogtreecommitdiff
path: root/files/.zsh/rc/S10_zshopts
blob: 241eaa9cc9326e854967ee8b48c12b41a9112842 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
if test -x =dircolors ; then
    eval "`dircolors`"
    export ZLS_COLORS=$LS_COLORS
fi

autoload -U is-at-least

# Docs https://zsh.sourceforge.io/Doc/Release/Options.html

setopt aliases
setopt all_export
setopt auto_cd
setopt auto_list
setopt auto_menu
setopt auto_param_keys
setopt auto_param_slash
setopt auto_remove_slash
setopt auto_resume
setopt always_to_end

setopt bad_pattern
setopt no_bg_nice
setopt no_bsd_echo

setopt check_jobs
setopt correct
setopt no_correct_all

setopt no_emacs
setopt exec

setopt hash_cmds
setopt hash_dirs
setopt hash_list_all
setopt no_hup
setopt no_ignore_eof

setopt list_ambiguous
setopt list_packed
setopt mark_dirs
setopt notify

setopt no_rm_star_silent
setopt no_rm_star_wait

setopt vi
setopt zle

[ -w "$zsh_cache" ] && HISTFILE=$zsh_cache/history

LISTMAX=1000
REPORTIME=2

# History
# Based on https://github.com/mattjj/my-oh-my-zsh/blob/master/history.zsh

# Eternal history
HISTSIZE=100000000
SAVEHIST=100000000

setopt bang_hist              # Treat the '!' character specially during expansion.
setopt extended_history       # Write the history file in the ":start:elapsed;command" format.
setopt inc_append_history     # Write to the history file immediately, not when the shell exits.
setopt share_history          # Share history between all sessions.
setopt hist_expire_dups_first # Expire duplicate entries first when trimming history.
setopt hist_ignore_dups       # Don't record an entry that was just recorded again.
setopt hist_ignore_all_dups   # Delete old recorded entry if new entry is a duplicate.
setopt hist_find_no_dups      # Do not display a line previously found.
setopt hist_ignore_space      # Don't record an entry starting with a space.
setopt hist_save_no_dups      # Don't write duplicate entries in the history file.
setopt hist_reduce_blanks     # Remove superfluous blanks before recording entry.
setopt hist_verify            # Don't execute immediately upon history expansion.
setopt hist_beep              # Beep when accessing nonexistent history.
setopt hist_no_functions      # Remove function definitions from the history list
setopt hist_no_store          # Remove the history (fc -l) command from the history list when invoked

# vim: et ft=zsh :