GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mernen/completion-ruby: Command-line completion for Ruby-related commands under Bash: rake, bundle, gem, rails, ruby, jruby

BranchesTags
Open more actions menu

Latest commit

 

History

236 Commits
236 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
Earthfile
Earthfile
 
 
MIT-LICENSE
MIT-LICENSE
 
 
README.markdown
README.markdown
 
 
completion-bundle
completion-bundle
 
 
completion-gem
completion-gem
 
 
completion-jruby
completion-jruby
 
 
completion-rails
completion-rails
 
 
completion-rake
completion-rake
 
 
completion-ruby
completion-ruby
 
 
completion-ruby-all
completion-ruby-all
 
 

Repository files navigation

completion-ruby: bash completion for Ruby-related commands

completion-ruby is a set of bash scripts offering command-line completion for various Ruby-related commands and tools.

Installation

These scripts depend on some utility functions from bash-completion. It should be part of pretty much any modern Linux distribution, and you can install it on macOS using Homebrew:

brew install bash-completion

Save the completion files somewhere (in the same directory) and add the following line to your ~/.bashrc or ~/.profile:

. /path/to/completion-ruby-all

The completion-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, and source them individually.

Maintenance status

This project is considered stable. No new features are planned, and as a result it remains domant for months, but the continuous integration test suite will occasionally detect a change in behavior in a tool, and maintenance work is performed.

For information on the automated test suite, see the tests directory.

If one of the covered tools introduces a new flag that needs special treatment, please file an issue or pull request.

Why yet another completion script?

Before writing my own, I'd seen about five different scripts for rake completion. 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 other niceties were added, like command-line options completion and awareness of task arguments.

This script is not perfect (for instance, it won't update the cache if a dependency of the rakefile is updated; as a workaround, simply touch Rakefile), but it tries to cover all the most common cases without overcomplicating or overthinking the code.

License and website

Copyright © 2008–2025 Daniel Luz.

completion-ruby is distributed under the MIT license.

The source is available in a Git repository at GitHub.

For up-to-date information, visit this project's permalink.

About

Command-line completion for Ruby-related commands under Bash: rake, bundle, gem, rails, ruby, jruby

Topics

bash-completionrubyruby-cli

Resources

Readme
MIT license
Activity

Stars

155 stars

Watchers

2 watching

Forks

21 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.