From 9b0e0c786af71048c3f615e99de079d7ff86266e Mon Sep 17 00:00:00 2001 From: Daniel Kolsoi Date: Wed, 9 May 2018 23:37:32 -0400 Subject: [PATCH] Removed 'Rust' text from test; Silenced missing rustc warning --- powerlevel9k.zsh-theme | 2 +- test/segments/rust_version.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c901103d..530b0d9a 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1104,7 +1104,7 @@ prompt_root_indicator() { # Print Rust version number prompt_rust_version() { local rust_version - rust_version=$(command rustc --version 2>&1) + rust_version=$(command rustc --version 2>/dev/null) # Remove "rustc " (including the whitespace) from the beginning # of the version string and remove everything after the next # whitespace. This way we'll end up with only the version. diff --git a/test/segments/rust_version.spec b/test/segments/rust_version.spec index 49b06bcf..8274789f 100755 --- a/test/segments/rust_version.spec +++ b/test/segments/rust_version.spec @@ -19,7 +19,7 @@ function testRust() { alias rustc=mockRust POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version) - assertEquals "%K{208} %F{black}Rust 0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)" + assertEquals "%K{208} %F{black}0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)" unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS unalias rustc