aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-10 11:47:22 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-10 11:47:22 +0300
commit626056865d5c5f19f2b9873462c4f4dac508d141 (patch)
tree2dbb2868073ed5c779f71fd2a8129dc72cadb21d /internal/p10k.zsh
parent8a320aaf4e0e983f42a9717babba02f904d7b94e (diff)
add POWERLEVEL9K_RVM_SHOW_GEMSET and POWERLEVEL9K_RVM_SHOW_PREFIX
Some users want them. See https://github.com/Powerlevel9k/powerlevel9k/pull/1353.
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 035475d6..72b974ea 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1974,7 +1974,9 @@ prompt_rspec_stats() {
prompt_rvm() {
(( $+commands[rvm-prompt] )) || return
[[ $GEM_HOME == *rvm* && $ruby_string != $rvm_path/bin/ruby ]] || return
- local v=${${${GEM_HOME:t}%%${rvm_gemset_separator:-@}*}#*-}
+ local v=${GEM_HOME:t}
+ (( _POWERLEVEL9K_RVM_SHOW_GEMSET )) || v=${v%%${rvm_gemset_separator:-@}*}
+ (( _POWERLEVEL9K_RVM_SHOW_PREFIX )) || v=${v#*-}
[[ -n $v ]] || return
_p9k_prompt_segment "$0" "240" "$_p9k_color1" 'RUBY_ICON' 0 '' "${v//\%/%%}"
}
@@ -3608,6 +3610,8 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -b POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY 0
_p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
+ _p9k_declare -b POWERLEVEL9K_RVM_SHOW_GEMSET 0
+ _p9k_declare -b POWERLEVEL9K_RVM_SHOW_PREFIX 0
_p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_VERSION 1
_p9k_declare -b POWERLEVEL9K_CHRUBY_SHOW_ENGINE 1
_p9k_declare -b POWERLEVEL9K_STATUS_CROSS 0