1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Merge remote-tracking branch 'chhschou/master' into staging_065

Conflicts were:
- powerlevel9k.zsh-theme and test/segments/rust_version.spec:
rust_version Segment changed (#641) on master and colors got
names (#703) on next.
This commit is contained in:
Dominik Ritter 2018-06-07 00:44:47 +02:00
commit e763fa14b0
3 changed files with 6 additions and 5 deletions

View file

@ -96,7 +96,7 @@ case $POWERLEVEL9K_MODE in
VCS_GIT_GITLAB_ICON $'\uE20E ' #
VCS_HG_ICON $'\uE1C3 ' # 
VCS_SVN_ICON '(svn) '
RUST_ICON ''
RUST_ICON '(rust)'
PYTHON_ICON $'\ue63c' # 
SWIFT_ICON ''
GO_ICON ''
@ -478,7 +478,7 @@ case $POWERLEVEL9K_MODE in
VCS_GIT_GITLAB_ICON ''
VCS_HG_ICON ''
VCS_SVN_ICON ''
RUST_ICON ''
RUST_ICON 'Rust'
PYTHON_ICON ''
SWIFT_ICON 'Swift'
GO_ICON 'Go'

View file

@ -1273,9 +1273,9 @@ prompt_root_indicator() {
prompt_rust_version() {
local rust_version
rust_version=$(rustc --version 2>&1 | grep -oe "^rustc\s*[^ ]*" | grep -o '[0-9.a-z\\\-]*$')
if [[ -n "$rust_version" ]]; then
"$1_prompt_segment" "$0" "$2" "darkorange" "$DEFAULT_COLOR" "Rust $rust_version" 'RUST_ICON'
"$1_prompt_segment" "$0" "$2" "darkorange" "$DEFAULT_COLOR" "$rust_version" 'RUST_ICON'
fi
}

View file

@ -19,7 +19,8 @@ function testRust() {
alias rustc=mockRust
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version)
assertEquals "%K{208} %F{black}Rust 0.4.1a-alpha %k%F{darkorange}%f " "$(build_left_prompt)"
assertEquals "%K{208} %F{black%}Rust%f %F{black}0.4.1a-alpha %k%F{darkorange}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unalias rustc