How to clear both tmux history (tmux clear-history
) and zsh (zle clear-screen
) with one key combination?
A common way of clearing screen is ^L
, and I tried adding the following to .tmux.conf
:
bind -Troot C-l send-keys C-l\; clear-history
So ^L
clears the screen, and clears almost all the history, except that last one screen.
A subsequent ^L
clears it all.
Can the same be achieved with one key combination?
bind -Troot C-l send-keys C-l\; clear-history\; send-keys C-l\; clear-history
doesn't work. Neither the following does:
bind -Troot C-l send-keys C-l C-l\; clear-history