summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLFDM <1986gh@gmail.com>2014-01-06 09:57:09 +0100
committerLFDM <1986gh@gmail.com>2014-01-06 09:57:09 +0100
commit72392a2c27386706c78efe1ace9b84e602d9d1ff (patch)
tree0fc8ee05545930fe56307bb34eba1eaaba52ea94
parentc6aacf611d51f7c00d216f77c3b32174cc3bed9c (diff)
downloadzsh-72392a2c27386706c78efe1ace9b84e602d9d1ff.tar.gz
zsh-72392a2c27386706c78efe1ace9b84e602d9d1ff.tar.bz2
zsh-72392a2c27386706c78efe1ace9b84e602d9d1ff.zip
Adds all other dummy implementations.
-rw-r--r--lib/ruby_prompts.zsh15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/ruby_prompts.zsh b/lib/ruby_prompts.zsh
index 2ef334d5f..9ca6e1fc7 100644
--- a/lib/ruby_prompts.zsh
+++ b/lib/ruby_prompts.zsh
@@ -1,3 +1,10 @@
+function chruby_prompt_info hg_prompt_info pyenv_prompt_info \
+ rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \
+ virtualenv_prompt_info {
+ return 1
+}
+
+# oh-my-zsh supports an rvm prompt by default
# get the name of the rvm ruby version
function rvm_prompt_info() {
[ -f $HOME/.rvm/bin/rvm-prompt ] || return 1
@@ -7,12 +14,8 @@ function rvm_prompt_info() {
echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}"
}
-# using the chruby and/or rbenv plugins will override
-# these with real implementations
-function chruby_prompt_info rbenv_prompt_info {
- return 1
-}
-
+# use this to enable users to see their ruby version, no matter which
+# version management system they use
function ruby_prompt_info() {
echo $(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info)
}