mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Give agnoster an option to provide prompt on newline
This change adds a new environment export called PROMPT_ON_NEWLINE. For example, when configured in ~/.zshrc as export PROMPT_ON_NEWLINE=true, the prompt will always show on a new line so that you have more room to type. Use full when working in deep folders. Should be backwards compatible with previous default behavior.
This commit is contained in:
parent
207b6a1e33
commit
ff6ae942de
1 changed files with 6 additions and 1 deletions
|
|
@ -178,4 +178,9 @@ build_prompt() {
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "${PROMPT_ON_NEWLINE}" = "true" ] ; then
|
||||||
|
PROMPT='╭─%{%f%b%k%}$(build_prompt)
|
||||||
|
╰─ '
|
||||||
|
else
|
||||||
PROMPT='%{%f%b%k%}$(build_prompt) '
|
PROMPT='%{%f%b%k%}$(build_prompt) '
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue