Have ctrl_l clear the current prompt line so it is not saved in the scrollback

This commit is contained in:
Kovid Goyal
2023-07-13 22:01:27 +05:30
parent 4a039a45ec
commit d4f9d22c92

View File

@@ -4033,7 +4033,7 @@ the screen, instead of just clearing the screen. For ZSH, in :file:`~/.zshrc`, a
.. code-block:: zsh
ctrl_l() {
builtin print -rn -- $'\e[H\e[22J' > "$TTY"
builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY"
builtin zle .reset-prompt
builtin zle -R
}