Skip to content

Commit 6260568

Browse files
committed
add POWERLEVEL9K_RVM_SHOW_GEMSET and POWERLEVEL9K_RVM_SHOW_PREFIX
Some users want them. See Powerlevel9k/powerlevel9k#1353.
1 parent 8a320aa commit 6260568

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/p10k.zsh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,9 @@ prompt_rspec_stats() {
19741974
prompt_rvm() {
19751975
(( $+commands[rvm-prompt] )) || return
19761976
[[ $GEM_HOME == *rvm* && $ruby_string != $rvm_path/bin/ruby ]] || return
1977-
local v=${${${GEM_HOME:t}%%${rvm_gemset_separator:-@}*}#*-}
1977+
local v=${GEM_HOME:t}
1978+
(( _POWERLEVEL9K_RVM_SHOW_GEMSET )) || v=${v%%${rvm_gemset_separator:-@}*}
1979+
(( _POWERLEVEL9K_RVM_SHOW_PREFIX )) || v=${v#*-}
19781980
[[ -n $v ]] || return
19791981
_p9k_prompt_segment "$0" "240" "$_p9k_color1" 'RUBY_ICON' 0 '' "${v//\%/%%}"
19801982
}
@@ -3608,6 +3610,8 @@ _p9k_init_params() {
36083610
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
36093611
_p9k_declare -b POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY 0
36103612
_p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
3613+
_p9k_declare -b POWERLEVEL9K_RVM_SHOW_GEMSET 0
3614+
_p9k_declare -b POWERLEVEL9K_RVM_SHOW_PREFIX 0
36113615
_p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_VERSION 1
36123616
_p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_ENGINE 1
36133617
_p9k_declare -b POWERLEVEL9K_STATUS_CROSS 0

0 commit comments

Comments
 (0)