From: Alexander Barton Date: Sun, 27 Sep 2015 17:39:01 +0000 (+0200) Subject: Run ax_{logname|hostname}_prompt_yn() only once when setting PS1 X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=50b9dec81488cb447aff3e460a0bb7bb40335af5;hp=b51f608157ed9374fddc2df36fff5b5dc460992d Run ax_{logname|hostname}_prompt_yn() only once when setting PS1 Don't run these functions each time the prompt is displayed. --- diff --git a/default_plugins/prompt/prompt.zlogin b/default_plugins/prompt/prompt.zlogin index 7514fc4..862366f 100644 --- a/default_plugins/prompt/prompt.zlogin +++ b/default_plugins/prompt/prompt.zlogin @@ -2,7 +2,7 @@ # prompt.zlogin: Setup default prompts # Default prompt -PS1='$(ax_logname_prompt_yn)$(ax_hostname_prompt_yn)%B%2~%b $(ax_vcs_prompt)%{$fg_no_bold[green]%}%B\$%b%{$reset_color%} ' +PS1="$(ax_logname_prompt_yn)$(ax_hostname_prompt_yn)%B%2~%b "'$(ax_vcs_prompt)'"%{$fg_no_bold[green]%}%B\$%b%{$reset_color%} " # Prompt on right side RPS1="%(?..%{$fg_no_bold[red]%}%? ↵%{$reset_color%})"