about summary refs log tree commit diff
path: root/zsh/.zsh.d/20_history.zsh
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>1970-01-01 03:00:00 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-20 11:51:54 +0300
commit38bab29776950ac2364ed64195b89887717c33de (patch)
treeedaaf366a55dbe96d268019124536bc504c64e87 /zsh/.zsh.d/20_history.zsh
chore: init HEAD master
Diffstat (limited to '')
-rw-r--r--zsh/.zsh.d/20_history.zsh20
1 files changed, 20 insertions, 0 deletions
diff --git a/zsh/.zsh.d/20_history.zsh b/zsh/.zsh.d/20_history.zsh
new file mode 100644
index 0000000..d1931f3
--- /dev/null
+++ b/zsh/.zsh.d/20_history.zsh
@@ -0,0 +1,20 @@
+#!/usr/bin/env zsh
+
+[ "${HISTFILE: -4}" != "_zsh" ] && export HISTFILE="${HISTFILE}_zsh"
+export SAVEHIST="${HISTSIZE}"
+
+setopt APPEND_HISTORY
+setopt BANG_HIST
+setopt EXTENDED_HISTORY
+setopt HIST_EXPIRE_DUPS_FIRST
+setopt HIST_IGNORE_ALL_DUPS
+setopt HIST_IGNORE_DUPS
+setopt HIST_IGNORE_SPACE
+setopt HIST_REDUCE_BLANKS
+setopt HIST_SAVE_NO_DUPS
+setopt HIST_VERIFY
+setopt INC_APPEND_HISTORY
+setopt SHARE_HISTORY
+unsetopt HIST_BEEP
+
+export HISTIGNORE="ls:cd:cd -:pwd:exit:date:cal:* --help"

Consider giving Nix/NixOS a try! <3