mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 21:41:57 +00:00
speed up rvm prompt
This commit is contained in:
parent
b6ba19617c
commit
8785fa1f25
1 changed files with 5 additions and 7 deletions
|
@ -1393,13 +1393,11 @@ prompt_rspec_stats() {
|
|||
################################################################
|
||||
# Segment to display Ruby Version Manager information
|
||||
prompt_rvm() {
|
||||
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" "240" "$DEFAULT_COLOR" 'RUBY_ICON' 0 '' "${${version_and_gemset//\%/%%}//\\/\\\\}"
|
||||
fi
|
||||
fi
|
||||
(( $+commands[rvm-prompt] )) || return
|
||||
[[ $GEM_HOME == *rvm* && $ruby_string != $rvm_path/bin/ruby ]] || return
|
||||
local v=${${${GEM_HOME:t}%%${rvm_gemset_separator:-@}*}#*-}
|
||||
[[ -n $v ]] || return
|
||||
"$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" 'RUBY_ICON' 0 '' "${${v//\%/%%}//\\/\\\\}"
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
|
Loading…
Reference in a new issue