mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-26 05:50:07 +00:00
speed up aws_eb_env prompt
This commit is contained in:
parent
5b703c0db0
commit
dc6fdf52b7
1 changed files with 3 additions and 5 deletions
|
@ -377,11 +377,9 @@ prompt_aws() {
|
||||||
################################################################
|
################################################################
|
||||||
# Current Elastic Beanstalk environment
|
# Current Elastic Beanstalk environment
|
||||||
prompt_aws_eb_env() {
|
prompt_aws_eb_env() {
|
||||||
# TODO(roman): This is clearly broken. Fix it.
|
[[ -r .elasticbeanstalk/config.yml ]] || return
|
||||||
local eb_env=$(grep environment .elasticbeanstalk/config.yml 2> /dev/null | awk '{print $2}')
|
local v=${=$(grep environment .elasticbeanstalk/config.yml 2>/dev/null)[2]}
|
||||||
if [[ -n "$eb_env" ]]; then
|
[[ -n $v ]] && "$1_prompt_segment" "$0" "$2" black green 'AWS_EB_ICON' 0 '' "${v//\%/%%}"
|
||||||
"$1_prompt_segment" "$0" "$2" black green 'AWS_EB_ICON' 0 '' "${eb_env//\%/%%}"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
Loading…
Reference in a new issue