Can I configure my prompt to show a new line after each command?
To give you an example. In the following screenshot I did run cat .zshrc
. I want to have a new line between the last output line of the command, . ~/.zsh_aliases
, and ~ $
.
Use ⌥↩︎ ( Option / Alt + Return ), or ⎋, ↩︎ ( Esc then Return ). This will only work if you've called bindkey -e previously or somewhere in your . zshrc.
To customize the ZSH prompt, we need to modify the prompt= variable inside the . zshrc file. We can populate the prompt variable with various placeholders, which will alter how the ZSH prompt appears.
pwd is a shell builtin in most modern shells such as bash and zsh. Its behavior is slightly different than the standalone /bin/pwd executable. You can use the type command to display all locations containing pwd : type -a pwd pwd is a shell builtin pwd is /bin/pwd.
Zsh Config Path By default, Zsh will try to find the user's configuration files in the $HOME directory. You can change it by setting the environment variable $ZDOTDIR . Personally, I like to have all my configuration files in $HOME/. config .
Edit ~/.zshrc
and add the line precmd() { print "" }
. This will simply print an empty line before the PROMPT is rendered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With