Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh new line prompt after each command

Tags:

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 ~ $.

enter image description here

like image 458
orschiro Avatar asked Dec 11 '13 07:12

orschiro


People also ask

How do I add a new line in Zshrc?

Use ⌥↩︎ ( Option / Alt + Return ), or ⎋, ↩︎ ( Esc then Return ). This will only work if you've called bindkey -e previously or somewhere in your . zshrc.

How do I change the prompt in oh my ZSH?

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.

What is PWD in ZSH?

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.

How do I change my ZSH settings?

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 .


1 Answers

Edit ~/.zshrc and add the line precmd() { print "" }. This will simply print an empty line before the PROMPT is rendered.

like image 128
Abid H. Mujtaba Avatar answered Sep 20 '22 03:09

Abid H. Mujtaba