1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

fix: declare variables as global when using typeset

Fixes fb86ec77
This commit is contained in:
Marc Cornellà
2021-12-16 10:15:55 +01:00
parent fb86ec7749
commit 7d03ea18ed
4 changed files with 8 additions and 8 deletions

View File

@@ -45,8 +45,8 @@ setopt prompt_subst
# See if we can use colors.
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
typeset PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset PR_LIGHT_$color="%{$fg[${(L)color}]%}"
typeset -g PR_$color="%{$terminfo[bold]$fg[${(L)color}]%}"
typeset -g PR_LIGHT_$color="%{$fg[${(L)color}]%}"
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"