Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
76fb7a25
Commit
76fb7a25
authored
Mar 04, 2020
by
chieping
Committed by
Marc Cornellà
Mar 04, 2020
Browse files
rbenv: fix rbenv_prompt_info prefix and suffix (#3764)
Closes #3764
parent
22fed4fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/rbenv/rbenv.plugin.zsh
View file @
76fb7a25
...
...
@@ -47,11 +47,10 @@ if [[ $FOUND_RBENV -eq 1 ]]; then
}
function
rbenv_prompt_info
()
{
if
[[
-n
$(
current_gemset
)
]]
;
then
echo
"
$(
current_ruby
)
@
$(
current_gemset
)
"
else
echo
"
$(
current_ruby
)
"
fi
local
ruby
=
$(
current_ruby
)
gemset
=
$(
current_gemset
)
echo
-n
"
${
ZSH_THEME_RUBY_PROMPT_PREFIX
}
"
[[
-n
"
$gemset
"
]]
&&
echo
-n
"
${
ruby
}
@
${
gemset
}
"
||
echo
-n
"
${
ruby
}
"
echo
"
${
ZSH_THEME_RUBY_PROMPT_SUFFIX
}
"
}
else
alias
rubies
=
"ruby -v"
...
...
@@ -59,7 +58,11 @@ else
function
current_ruby
()
{
echo
"not supported"
}
function
current_gemset
()
{
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
unset
FOUND_RBENV rbenvdirs
dir
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment