Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

mernen/completion-ruby

Repository files navigation

completion-ruby is a set ofbash scripts offering command-linecompletion for variousRuby-related commands and tools.

Installation

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-completion

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

. /path/to/completion-ruby-all

Thecompletion-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.

Maintenance status

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.

Why yet another completion script?

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.

License and website

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

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp