diff options
-rwxr-xr-x | functions/vcs.zsh | 4 | ||||
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index cb53dd3e..04a07e5d 100755 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh @@ -15,10 +15,10 @@ function +vi-git-untracked() { # dump out if we're outside a git repository (which includes being in the .git folder) [[ $? != 0 || -z $repoTopLevel ]] && return - local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}") + local untrackedFiles=$(command git ls-files --others --exclude-standard "${repoTopLevel}" 2> /dev/null) if [[ -z $untrackedFiles && "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" ]]; then - untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard') + untrackedFiles+=$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard' 2> /dev/null) fi [[ -z $untrackedFiles ]] && return diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 51e64765..427e9b00 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1344,10 +1344,12 @@ prompt_rspec_stats() { ################################################################ # Segment to display Ruby Version Manager information prompt_rvm() { - local version_and_gemset=${rvm_env_string/ruby-} + if [ $commands[rvm-prompt] ]; then + local version_and_gemset=${$(rvm-prompt v p)/ruby-} - if [[ -n "$version_and_gemset" ]]; then - "$1_prompt_segment" "$0" "$2" "grey35" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON' + if [[ -n "$version_and_gemset" ]]; then + "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON' + fi fi } |