Use BASH to get Ruby version, not AWK
No need for AWK there. By using just `read` (builtin), instead of AWK, this commit winds up being a considerable optimization. NOTE: The `_` is just commonly used to indicate junk; not used.pull/1840/head
parent
387425e2b2
commit
3aa8592350
|
|
@ -420,7 +420,7 @@ function chruby_version_prompt {
|
|||
chruby_auto
|
||||
fi
|
||||
|
||||
ruby_version=$(ruby --version | awk '{print $1, $2;}') || return
|
||||
read _ ruby_version _ <<< "$(ruby --version)" || return
|
||||
|
||||
if ! chruby | grep -q '\*'; then
|
||||
ruby_version="${ruby_version} (system)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue