So, I started using zsh and oh-my-zsh recently. I am using the pure (refined) theme and the prompt shows extra info above the prompt.
When I clear the Terminal with Ctrl + L, the whole Terminal gets cleared but the line before the prompt that shows the current directory and git information also get cleared. When I type clear
however, the line stays with the prompt while the Terminal gets cleared.
Is there a way to keep that line when I press Ctrl + L? What does that shortcut point to and how can I change it? In my Terminal preferences (I'm on Manjaro Budgie), that key binding is absent in the shortcuts list.
pure
theme; bothclear
and^L
draw the full 2-line prompt. You can see what^L
is bound to withbindkey | fgrep '^L'
. It defaults toclear-screen
, which you can read about inman zshzle
. But I suspect there's something else at fault; it should work without any hacks. I'd test a different terminal emulator (xterm, sakura, Konsole). Then I'd create a clean.zshrc
with onlysource /path/to/pure.zsh
and see if that works. Then gradually add more of your other config back in until you find the piece that is breaking it..zshrc
file.