mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-10 05:41:18 +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 path _chruby_path
|
||||||
zstyle -s :omz:plugins:chruby auto _chruby_auto
|
zstyle -s :omz:plugins:chruby auto _chruby_auto
|
||||||
|
|
||||||
if [[ -r "${_chruby_path}" ]]; then
|
if [[ -r "$_chruby_path" ]]; then
|
||||||
source "${_chruby_path}"
|
source "$_chruby_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -r "${_chruby_auto}" ]]; then
|
if [[ -r "$_chruby_auto" ]]; then
|
||||||
source "${_chruby_auto}"
|
source "$_chruby_auto"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function () {
|
function () {
|
||||||
local _chruby_homebrew_prefix="$(brew --prefix chruby) &> /dev/null"
|
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/chruby.sh"
|
||||||
source "${_chruby_homebrew_prefix}/share/chruby/auto.sh"
|
source "${_chruby_homebrew_prefix}/share/chruby/auto.sh"
|
||||||
elif [[ -r "/usr/local/share/chruby/chruby.sh" ]] ; then
|
elif [[ -r "/usr/local/share/chruby/chruby.sh" ]] ; then
|
||||||
|
|
@ -72,8 +72,8 @@ function ensure_chruby() {
|
||||||
|
|
||||||
function current_ruby() {
|
function current_ruby() {
|
||||||
local _ruby="$(chruby | grep \* | tr -d '* ')"
|
local _ruby="$(chruby | grep \* | tr -d '* ')"
|
||||||
if [[ -n "${_ruby}" ]]; then
|
if [[ -n "$_ruby" ]]; then
|
||||||
echo "${_ruby}"
|
echo "$_ruby"
|
||||||
else
|
else
|
||||||
echo "system"
|
echo "system"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue