]> arthur.barton.de Git - ax-zsh.git/blobdiff - default_plugins/history/history.zshrc
history: Introduce the clear_history() function
[ax-zsh.git] / default_plugins / history / history.zshrc
index f6a907bac027007cf60cf756aa1a9d3ad92a1da6..579d6713c15929cc1769d2522bffea104a49c106 100644 (file)
@@ -1,6 +1,12 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
 # history.zshrc: Setup ZSH history
 
 # AX-ZSH: Alex' Modular ZSH Configuration
 # history.zshrc: Setup ZSH history
 
+function clear_history {
+       local HISTSIZE=0
+       cat /dev/null >"$HISTFILE"
+       fc -R
+}
+
 HISTSIZE=10000
 SAVEHIST=10000
 
 HISTSIZE=10000
 SAVEHIST=10000