mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
make this a proper switch-case
This commit is contained in:
parent
d87a81e147
commit
1bd6f41be5
1 changed files with 6 additions and 5 deletions
11
home/zshrc
11
home/zshrc
|
@ -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%} "
|
||||
|
|
Loading…
Add table
Reference in a new issue