From ff6ae942deaf45d4d8f961d7d50a12269951a6f3 Mon Sep 17 00:00:00 2001 From: Edward Raigosa Date: Sun, 27 Jul 2014 20:35:08 -0700 Subject: [PATCH] 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. --- themes/agnoster.zsh-theme | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 2b33c48bc..016a45fad 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -178,4 +178,9 @@ build_prompt() { prompt_end } -PROMPT='%{%f%b%k%}$(build_prompt) ' +if [ "${PROMPT_ON_NEWLINE}" = "true" ] ; then + PROMPT='╭─%{%f%b%k%}$(build_prompt) +╰─ ' +else + PROMPT='%{%f%b%k%}$(build_prompt) ' +fi