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
terminalforlife 2021-02-17 22:19:08 +00:00
parent 387425e2b2
commit 3aa8592350
1 changed files with 1 additions and 1 deletions

View File

@ -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)"