mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
[chruby] adhere to the style guide
noted in the review: https://github.com/robbyrussell/oh-my-zsh/pull/5562/files#r94311319
This commit is contained in:
parent
edf38111d9
commit
98721878fb
1 changed files with 7 additions and 7 deletions
|
|
@ -43,19 +43,19 @@ _source_from_omz_settings() {
|
|||
zstyle -s :omz:plugins:chruby path _chruby_path
|
||||
zstyle -s :omz:plugins:chruby auto _chruby_auto
|
||||
|
||||
if [[ -r "${_chruby_path}" ]]; then
|
||||
source "${_chruby_path}"
|
||||
if [[ -r "$_chruby_path" ]]; then
|
||||
source "$_chruby_path"
|
||||
fi
|
||||
|
||||
if [[ -r "${_chruby_auto}" ]]; then
|
||||
source "${_chruby_auto}"
|
||||
if [[ -r "$_chruby_auto" ]]; then
|
||||
source "$_chruby_auto"
|
||||
fi
|
||||
}
|
||||
|
||||
function () {
|
||||
local _chruby_homebrew_prefix="$(brew --prefix chruby) &> /dev/null"
|
||||
|
||||
if _homebrew-installed && [ -r "${_chruby_homebrew_prefix}" ] ; then
|
||||
if _homebrew-installed && [[ -r "$_chruby_homebrew_prefix" ]] ; then
|
||||
source "${_chruby_homebrew_prefix}/share/chruby/chruby.sh"
|
||||
source "${_chruby_homebrew_prefix}/share/chruby/auto.sh"
|
||||
elif [[ -r "/usr/local/share/chruby/chruby.sh" ]] ; then
|
||||
|
|
@ -72,8 +72,8 @@ function ensure_chruby() {
|
|||
|
||||
function current_ruby() {
|
||||
local _ruby="$(chruby | grep \* | tr -d '* ')"
|
||||
if [[ -n "${_ruby}" ]]; then
|
||||
echo "${_ruby}"
|
||||
if [[ -n "$_ruby" ]]; then
|
||||
echo "$_ruby"
|
||||
else
|
||||
echo "system"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue