stackexchange-gilles

https://unix.stackexchange.com/questions/544373/how-to-clear

Oct 3rd, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. HISTFILE=${ZDOTDIR:-~}/.zsh_history
  2. HISTSIZE=20
  3. SAVEHIST=$HISTSIZE
  4. setopt extended_glob
  5. function erase_history { local HISTSIZE=0; }
  6. function zshaddhistory_erase_history {
  7.   [[ $1 != [[:space:]]#erase_history[[:space:]]# ]]
  8. }
  9. zshaddhistory_functions+=(zshaddhistory_erase_history)
Add Comment
Please, Sign In to add comment