mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 05:40:07 +00:00
Rename VCS default state to clean
This commit is contained in:
parent
2260b83c98
commit
9ac79bd3aa
2 changed files with 13 additions and 3 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,5 +1,15 @@
|
|||
## v0.4.0 (next)
|
||||
|
||||
### `vcs` changes
|
||||
|
||||
The default state was renamed to `clean`. If you overrode foreground
|
||||
or background color in the past, you need to rename your variables to:
|
||||
|
||||
```zsh
|
||||
POWERLEVEL9K_VCS_CLEAN_FOREGROUND='cyan'
|
||||
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='white'
|
||||
```
|
||||
|
||||
### `aws_eb_env` added
|
||||
|
||||
This segment displays the current Elastic Beanstalk environment.
|
||||
|
|
|
@ -755,11 +755,11 @@ prompt_vcs() {
|
|||
VCS_WORKDIR_DIRTY=false
|
||||
VCS_WORKDIR_HALF_DIRTY=false
|
||||
|
||||
# The vcs segment can have three different states - defaults to ''.
|
||||
# The vcs segment can have three different states - defaults to 'clean'.
|
||||
local current_state=""
|
||||
typeset -AH vcs_states
|
||||
vcs_states=(
|
||||
'' 'green'
|
||||
'clean' 'green'
|
||||
'modified' 'red'
|
||||
'untracked' 'yellow'
|
||||
)
|
||||
|
@ -815,7 +815,7 @@ prompt_vcs() {
|
|||
if [[ "$VCS_WORKDIR_HALF_DIRTY" == true ]]; then
|
||||
current_state='untracked'
|
||||
else
|
||||
current_state=''
|
||||
current_state='clean'
|
||||
fi
|
||||
fi
|
||||
"$1_prompt_segment" "${0}_${(U)current_state}" "$2" "${vcs_states[$current_state]}" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
||||
|
|
Loading…
Reference in a new issue