mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 08:50:08 +00:00
parent
22fed4fbcb
commit
76fb7a258b
1 changed files with 9 additions and 6 deletions
|
@ -47,11 +47,10 @@ if [[ $FOUND_RBENV -eq 1 ]]; then
|
||||||
}
|
}
|
||||||
|
|
||||||
function rbenv_prompt_info() {
|
function rbenv_prompt_info() {
|
||||||
if [[ -n $(current_gemset) ]] ; then
|
local ruby=$(current_ruby) gemset=$(current_gemset)
|
||||||
echo "$(current_ruby)@$(current_gemset)"
|
echo -n "${ZSH_THEME_RUBY_PROMPT_PREFIX}"
|
||||||
else
|
[[ -n "$gemset" ]] && echo -n "${ruby}@${gemset}" || echo -n "${ruby}"
|
||||||
echo "$(current_ruby)"
|
echo "${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
alias rubies="ruby -v"
|
alias rubies="ruby -v"
|
||||||
|
@ -59,7 +58,11 @@ else
|
||||||
function current_ruby() { echo "not supported" }
|
function current_ruby() { echo "not supported" }
|
||||||
function current_gemset() { echo "not supported" }
|
function current_gemset() { echo "not supported" }
|
||||||
function gems() { echo "not supported" }
|
function gems() { echo "not supported" }
|
||||||
function rbenv_prompt_info() { echo "system: $(ruby -v | cut -f-2 -d ' ')" }
|
function rbenv_prompt_info() {
|
||||||
|
echo -n "${ZSH_THEME_RUBY_PROMPT_PREFIX}"
|
||||||
|
echo -n "system: $(ruby -v | cut -f-2 -d ' ')"
|
||||||
|
echo "${ZSH_THEME_RUBY_PROMPT_SUFFIX}"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset FOUND_RBENV rbenvdirs dir
|
unset FOUND_RBENV rbenvdirs dir
|
||||||
|
|
Loading…
Reference in a new issue