From 3a6fa9149b7a3db89d22f40ae371ad636f5ed527 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 7 Oct 2018 22:57:16 +0200 Subject: Fix tilde substitution in theme prompts These themes used an adhoc substitution of $HOME for tilde in $PWD, but it's better to use '%~' and is less error prone. See #7160 --- themes/candy-kingdom.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/candy-kingdom.zsh-theme') diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 9d2103926..30ce785c0 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -17,7 +17,7 @@ function box_name { } PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ ' ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: " -- cgit v1.2.3-70-g09d2