Fix double variable interpolation in branch name
This commit prevents a git branch named e.g. `$TMPPREFIX` from being expanded into the actual contents of the `$TMPPREFIX` variable. Fixes #224.
This commit is contained in:
5
pure.zsh
5
pure.zsh
@@ -132,8 +132,9 @@ prompt_pure_preprompt_render() {
|
|||||||
|
|
||||||
# construct preprompt, beginning with path
|
# construct preprompt, beginning with path
|
||||||
local preprompt="%F{blue}%~%f"
|
local preprompt="%F{blue}%~%f"
|
||||||
# git info
|
# git info, delay evaluation of branch name until the prompt expansion to
|
||||||
preprompt+="%F{$git_color}${vcs_info_msg_0_}${prompt_pure_git_dirty}%f"
|
# prevent e.g. double variable interpolation
|
||||||
|
preprompt+="%F{$git_color}"'$vcs_info_msg_0_'"${prompt_pure_git_dirty}%f"
|
||||||
# git pull/push arrows
|
# git pull/push arrows
|
||||||
preprompt+="%F{cyan}${prompt_pure_git_arrows}%f"
|
preprompt+="%F{cyan}${prompt_pure_git_arrows}%f"
|
||||||
# username and machine if applicable
|
# username and machine if applicable
|
||||||
|
|||||||
Reference in New Issue
Block a user