mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-08 13:33:02 -04:00
set C-l to clear the scrollback buffer as well as the screen
This commit is contained in:
parent
84e9516ed2
commit
a4eb132908
1 changed files with 15 additions and 0 deletions
|
@ -45,6 +45,21 @@
|
||||||
cnd() {
|
cnd() {
|
||||||
mkdir $1 && cd $1;
|
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;
|
enableCompletion = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue