-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathrobbyrussell.zsh-theme
More file actions
28 lines (22 loc) · 945 Bytes
/
robbyrussell.zsh-theme
File metadata and controls
28 lines (22 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# to get ➜ kubernetes-core-services-for-eks-cluster main git:(master)
#AWS Profile:
# - display current AWS_PROFILE name
# - displays yellow on red if profile name contains 'production' or
# ends in '-prod'
# - displays black on green otherwise
prompt_aws_profile() {
local aws_profile="$AWS_PROFILE"
if [[ -n $aws_profile ]]; then
if [[ $aws_profile == *"prod" || $aws_profile == *"production"* ]]; then
prompt_segment red yellow "$aws_profile"
else
prompt_segment green black "$aws_profile"
fi
fi
}
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(prompt_aws_profile) $reset_color% $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"