1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 02:43:23 -07:00

make this a proper switch-case

This commit is contained in:
Connor Olding 2021-09-27 19:22:10 -07:00
parent d87a81e147
commit 1bd6f41be5

View File

@ -230,11 +230,12 @@ function {
local good=42 # green
local bad=41 # red
local host="${(L)HOST}"
[ "$host" = neobanshee ] && good=46 # cyan
[ "$host" = spectre ] && good=47 # white
[ "$host" = wraith ] && good=43 # yellow
[ "$host" = sabotage ] && good=45 # magenta
case "${(L)HOST}" in
(neobanshee) good=46;; # cyan
(spectre) good=47;; # white
(wraith) good=43;; # yellow
(sabotage) good=45;; # magenta
esac
# NOTE: i had ${s}10${e} here before, is it still necessary?
PROMPT="%{$reset${s}%(?.${good}.${bad})${e}${s}97${e}%}%#%{$reset%} "