Skip to content

Commit

Permalink
plugins/ruby: prepare for shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard committed Sep 19, 2021
1 parent d137b73 commit b0e29a6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions plugins/available/ruby.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b0e29a6

Please sign in to comment.