- Notifications
You must be signed in to change notification settings - Fork20
Command-line completion for Ruby-related commands under Bash: rake, bundle, gem, rails, ruby, jruby
License
mernen/completion-ruby
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
completion-ruby is a set ofbash scripts offering command-linecompletion for variousRuby-related commands and tools.
These scripts depend on some utility functions frombash-completion. Itshould be part of pretty much any modern Linux distribution, and you caninstall it on macOS usingHomebrew:
brew install bash-completionSave the completion files somewhere (in the same directory) and add thefollowing line to your~/.bashrc or~/.profile:
. /path/to/completion-ruby-allThecompletion-ruby-all script loads all the completions it finds,but only for the commands you appear to have installed.Alternatively, you can just save the specific scripts you wish, andsource them individually.
This project is consideredstable.No new features are planned, and as a result it remains domant for months,but the continuous integration test suite will occasionally detecta change in behavior in a tool, and maintenance work is performed.
For information on the automated test suite, see thetests directory.
If one of the covered tools introduces a new flag that needs special treatment,please file an issue or pull request.
Before writing my own, I'd seen about five different scripts forrakecompletion. None of them, though, at the same time:
- cached the task list for fast results;
- invalidated said cache when the rakefile was modified;
- worked properly with namespaces; and
- worked on subdirectories of the project
...among other minor quirks. While providing all of the above, a few otherniceties were added, like command-line options completion and awareness oftask arguments.
This script is not perfect (for instance, it won't update the cache ifa dependency of the rakefile is updated; as a workaround, simplytouch Rakefile), but it tries to cover all the most common cases withoutovercomplicating or overthinking the code.
Copyright © 2008–2025Daniel Luz.
completion-ruby is distributed under theMIT license.
The source is available in aGit repositoryat GitHub.
For up-to-date information, visitthis project's permalink.
About
Command-line completion for Ruby-related commands under Bash: rake, bundle, gem, rails, ruby, jruby
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.