Could not find tab completion for Rubygem in Bash / Zsh
RubyGem executable commands are installed in / usr / bin or / usr / local / bin or any other Ruby prefix. Tab filling for commands should work just like any other executable in your PATH. If it doesn't work, make sure the RubyGems directory sets the commands to PATH.
There is currently no official method for performing parameter tabs for any of these commands. If you need to tab for a command installed via RubyGems, you will need to write and / or install it yourself. See the Bash reference manual for details . There may already be a completion system for the specific command you are interested in, so be sure to use Google for that, but most commands installed with RubyGems don't have an automatic entry for them.
a source to share
Try: http://github.com/oggy/ruby-bash-completion To install it, just copy the gem file to / etc / bash _completion.d /
I had errors when trying to bookmark:
gem install
Because I didn't have a file cache in the .gem directory. So I just disabled it by editing the gem file. I changed the _gem_all_names function:
function _gem_all_names {
echo ""
}
a source to share
That github-hosted bash is now part of Ubuntu Lucid Lynx. Sweet! If you are apt-get install rubygems1.8
, then completion (commands and parameters!) Should just work.
Unfortunately, as stated, it will only complete if it sees a call gem1.8
, not a more convenient one gem
. You can fix it manually if it's oblique by expanding the last line /etc/bash_completion.d/gem1.8
to include gem
as part of the name list complete
. I'm sure there is a cleaner way, but it works.
a source to share