From b0e29a6a70aa9d518fb5675d2c891df809247808 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sat, 11 Sep 2021 18:27:43 -0700 Subject: [PATCH] plugins/ruby: prepare for `shellcheck` --- plugins/available/ruby.plugin.bash | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/available/ruby.plugin.bash b/plugins/available/ruby.plugin.bash index b116410671..d7506bba42 100644 --- a/plugins/available/ruby.plugin.bash +++ b/plugins/available/ruby.plugin.bash @@ -6,13 +6,14 @@ about-plugin 'ruby and rubygems specific functions and settings' # ~/.gem/ruby/${RUBY_VERSION}/bin/ if _command_exists ruby && _command_exists gem then - pathmunge "$(ruby -e 'print Gem.user_dir')/bin" after + pathmunge "$(ruby -e 'print Gem.user_dir')/bin" after fi -function remove_gem { - about 'removes installed gem' - param '1: installed gem name' - group 'ruby' +function remove_gem() +{ + about 'removes installed gem' + param '1: installed gem name' + group 'ruby' - gem list | grep $1 | awk '{ print $1; }' | xargs sudo gem uninstall + gem list | grep "$1" | awk '{ print $1; }' | xargs sudo gem uninstall }