diff --git a/common/users/homeModules/zsh.nix b/common/users/homeModules/zsh.nix index c8cc565..438266a 100644 --- a/common/users/homeModules/zsh.nix +++ b/common/users/homeModules/zsh.nix @@ -45,6 +45,21 @@ cnd() { mkdir $1 && cd $1; } + # MUST COME AFTER p10k + # make clear the scrollback buffer as well as the screen + # copy clear-screen into _orig_clear_Screen + zle -A clear-screen _orig_clear_screen + # define zsh widget func + _CLEAR() { + # clears the scrollback buffer + printf '\033[3J' + # call the orig clear-screen to do some housekeeping + zle _orig_clear_screen + } + # define our new widget + zle -N _CLEAR _CLEAR + # bind it to + bindkey _CLEAR ''; enableCompletion = true; plugins = [