You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dot_zsh/opt.zsh
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,3 +10,15 @@ setopt pushdminus # Invert meanings of +N and -N arguments to pushd
10
10
# Enable hex color codes
11
11
zmodload zsh/nearcolor
12
12
13
+
HISTFILE="$HOME/.zsh_history"# location of the history file
14
+
SAVEHIST=1000
15
+
HISTSIZE=1200 # current session's history limit, also following this https://unix.stackexchange.com/a/595475 $HISTSIZE should be at least 20% bigger than $SAVEHIST
16
+
17
+
setopt INC_APPEND_HISTORY # history file is updated immediately after a command is entered
18
+
setopt SHARE_HISTORY # allows multiple Zsh sessions to share the same command history
19
+
setopt EXTENDED_HISTORY # records the time when each command was executed
20
+
setopt APPENDHISTORY # ensures that each command entered in the current session is appended to the history file immediately after execution
0 commit comments