Search code examples
zshcommand-promptmacos-catalina

Show multiline PROMPT after clearing terminal Mac OS using zsh


I have made a custom PROMPT that uses multiple lines in my .zshcr file

PROMPT="%(1V.(%1v)"$'\n'".)%F{166}%n%f at %F{229}%m%f in %F{114}%.%f"$'\n'"$ "

but when I clear the terminal using command+K only the last line is shown in the cleared terminal. So I wonder if anyone knows what I need to add to have the full PROMPT shown in the cleared terminal


Solution

  • Press CtrlL. This activates Zsh's clear-screen widget.