Compare commits

...

4 Commits

Author SHA1 Message Date
nervo f1b0804c00
Merge c042ff4d41 into 6e7ac0544e 2025-02-20 06:28:38 +01:00
tuzi3040 6e7ac0544e
fix(agnoster): print white text over black for light theme only (#12983) 2025-02-19 12:37:18 +01:00
Adrien Plazas 92da3108b5
fix(agnoster): print white text over black (#12525) 2025-02-14 10:18:01 +01:00
Florian Rey c042ff4d41
feat(stern): introduce stern plugin 2024-10-23 09:13:02 +02:00
3 changed files with 34 additions and 4 deletions

9
plugins/stern/README.md Normal file
View File

@ -0,0 +1,9 @@
# Stern plugin
This plugin adds completion for [Stern](https://github.com/stern/stern), the multi pod and container log tailing for Kubernetes.
To use it, add `stern` to the plugins array in your zshrc file:
```zsh
plugins=(... stern)
```

View File

@ -0,0 +1,14 @@
# Completion
if (( ! $+commands[stern] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `stern`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_stern" ]]; then
typeset -g -A _comps
autoload -Uz _stern
_comps[stern]=_stern
fi
stern --completion zsh >| "$ZSH_CACHE_DIR/completions/_stern" &|

View File

@ -35,8 +35,14 @@
CURRENT_BG='NONE'
case ${SOLARIZED_THEME:-dark} in
light) CURRENT_FG='white';;
*) CURRENT_FG='black';;
light)
CURRENT_FG='white'
CURRENT_DEFAULT_FG='white'
;;
*)
CURRENT_FG='black'
CURRENT_DEFAULT_FG='default'
;;
esac
### Theme Configuration Initialization
@ -48,7 +54,7 @@ esac
: ${AGNOSTER_DIR_BG:=blue}
# user@host
: ${AGNOSTER_CONTEXT_FG:=default}
: ${AGNOSTER_CONTEXT_FG:=${CURRENT_DEFAULT_FG}}
: ${AGNOSTER_CONTEXT_BG:=black}
# Git related
@ -85,6 +91,7 @@ esac
: ${AGNOSTER_STATUS_RETVAL_FG:=red}
: ${AGNOSTER_STATUS_ROOT_FG:=yellow}
: ${AGNOSTER_STATUS_JOB_FG:=cyan}
: ${AGNOSTER_STATUS_FG:=${CURRENT_DEFAULT_FG}}
: ${AGNOSTER_STATUS_BG:=black}
## Non-Color settings - set to 'true' to enable
@ -327,7 +334,7 @@ prompt_status() {
[[ $UID -eq 0 ]] && symbols+="%{%F{$AGNOSTER_STATUS_ROOT_FG}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{$AGNOSTER_STATUS_JOB_FG}%}⚙"
[[ -n "$symbols" ]] && prompt_segment "$AGNOSTER_STATUS_BG" default "$symbols"
[[ -n "$symbols" ]] && prompt_segment "$AGNOSTER_STATUS_BG" "$AGNOSTER_STATUS_FG" "$symbols"
}
#AWS Profile: