mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
4 Commits
16fc3eb6f2
...
f1b0804c00
Author | SHA1 | Date |
---|---|---|
|
f1b0804c00 | |
|
6e7ac0544e | |
|
92da3108b5 | |
|
c042ff4d41 |
|
@ -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)
|
||||
```
|
|
@ -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" &|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue