mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-16 11:36:16 +08:00
refactor(michelebologna): merge color_array declaration and assignment
This commit is contained in:
parent
cb64103161
commit
f95bf08756
@ -31,8 +31,7 @@ local blue="%{$fg_bold[blue]%}"
|
||||
local magenta="%{$fg_bold[magenta]%}"
|
||||
local reset="%{$reset_color%}"
|
||||
|
||||
local -a color_array
|
||||
color_array=($green $red $cyan $yellow $blue $magenta)
|
||||
local -a color_array=($green $red $cyan $yellow $blue $magenta)
|
||||
|
||||
local username_color=$blue
|
||||
local hostname_color=$color_array[$[((#HOST))%6+1]] # choose hostname color based on first character
|
||||
|
||||
Loading…
Reference in New Issue
Block a user