Skip to content

Commit 2c46a4d

Browse files
committed
improved zsh history settings
1 parent 51c0757 commit 2c46a4d

File tree

1 file changed

+13
-0
lines changed
  • .devcontainer/features/bash-config/config

1 file changed

+13
-0
lines changed

.devcontainer/features/bash-config/config/zshrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ HISTCONTROL=ignoreboth:erasedups
1010
HISTSIZE=10000000
1111
SAVEHIST=$HISTSIZE
1212
HISTFILE=$CONFIG_FOLDER/.zsh_eternal_history
13+
setopt BANG_HIST # Treat the '!' character specially during expansion.
14+
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
15+
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
16+
setopt SHARE_HISTORY # Share history between all sessions.
17+
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
18+
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
19+
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
20+
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
21+
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
22+
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
23+
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
24+
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
25+
#setopt HIST_BEEP # Beep when accessing nonexistent history.
1326

1427
# set a theme compatible with vscode terminals
1528
ZSH_THEME="dst"

0 commit comments

Comments
 (0)