summaryrefslogtreecommitdiff
path: root/themes/dstufft.zsh-theme
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-10-07 22:57:16 +0200
committerMarc Cornellà <marc.cornella@live.com>2018-10-07 23:01:25 +0200
commit3a6fa9149b7a3db89d22f40ae371ad636f5ed527 (patch)
treedff5d81b485b35e5e53a51f8615832016a5b393a /themes/dstufft.zsh-theme
parentab9d92f66594f1eb20fbd3b067d4d4640cf0da1f (diff)
downloadzsh-3a6fa9149b7a3db89d22f40ae371ad636f5ed527.tar.gz
zsh-3a6fa9149b7a3db89d22f40ae371ad636f5ed527.tar.bz2
zsh-3a6fa9149b7a3db89d22f40ae371ad636f5ed527.zip
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
Diffstat (limited to 'themes/dstufft.zsh-theme')
-rw-r--r--themes/dstufft.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme
index 5a23fcea5..39ce69819 100644
--- a/themes/dstufft.zsh-theme
+++ b/themes/dstufft.zsh-theme
@@ -9,7 +9,7 @@ function virtualenv_info {
}
PROMPT='
-%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
+%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)
$(virtualenv_info)$(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"