From: Alexander Barton Date: Sun, 23 Aug 2020 15:02:38 +0000 (+0200) Subject: history: Introduce the clear_history() function X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=481ad061804a9699fc10a76132ae52ce888eb292;hp=d516f897ccc27caa540824a08809f40be86fd6d3 history: Introduce the clear_history() function --- diff --git a/default_plugins/history/history.zshrc b/default_plugins/history/history.zshrc index f6a907b..579d671 100644 --- a/default_plugins/history/history.zshrc +++ b/default_plugins/history/history.zshrc @@ -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