After I downloaded zsh and tried to go into a folder zsh always puts an enter after the name of the folder. Is there anyway I can fix this?
Best Answer
If you look at your .zshrc, you will see a line prompt adam1 which defines how your prompt is composed.
The definition of the adam1 is in the /usr/share/zsh/functions/Prompts/prompt_adam1_setup. A look at this file confirms it is rather complex : it measures the prompt length and compare to 40. If the prompt is too large, a newline is inserted before the %.
The command prompt -l displays the alternative themes. Then you can pick one of them and type for example prompt fire. When you are happy with an alternative, you can edit the .zshrc and change your future default theme. redhat and suse are some examples of single line prompts.
… the Control+V character (ASCII SYN) is bound to the quoted-insert widget. So just enter Control+V then Control+J (ASCII LF).
In ZLE's vi mode:
… the Control+Q (ASCII DC1) and Control+V characters are bound to the vi-quoted-insert widget. So again, in insert mode, just enter Control+V, then Control+J.
Remember:
Newlines in the middle of command lines separate commands. (In the terminology of the zsh manual: both newline and ; terminate a list.) Quote the newline if you don't want that.
Best Answer
If you look at your
.zshrc
, you will see a lineprompt adam1
which defines how your prompt is composed.The definition of the
adam1
is in the/usr/share/zsh/functions/Prompts/prompt_adam1_setup
. A look at this file confirms it is rather complex : it measures the prompt length and compare to 40. If the prompt is too large, a newline is inserted before the%
.The command
prompt -l
displays the alternative themes. Then you can pick one of them and type for exampleprompt fire
. When you are happy with an alternative, you can edit the.zshrc
and change your future default theme.redhat
andsuse
are some examples of single line prompts.