mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
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
This commit is contained in:
parent
ab9d92f665
commit
3a6fa9149b
5 changed files with 5 additions and 7 deletions
|
|
@ -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]%}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue