]> arthur.barton.de Git - ax-zsh.git/commitdiff
history: Introduce the clear_history() function
authorAlexander Barton <alex@barton.de>
Sun, 23 Aug 2020 15:02:38 +0000 (17:02 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 23 Aug 2020 15:02:38 +0000 (17:02 +0200)
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
 
+function clear_history {
+       local HISTSIZE=0
+       cat /dev/null >"$HISTFILE"
+       fc -R
+}
+
 HISTSIZE=10000
 SAVEHIST=10000