This repository has been archived by the owner. It is now read-only.
💀 OFFICIAL SUPPORT NOW AVAILABLE: https://github.com/heroku/heroku-cli-autocomplete
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/completion/heroku/command
README.md
heroku-completion.bash
init.rb

README.md

Heroku bash completion

This lets you use tab to autocomplete your heroku commands. Instant bliss.

The plugin generates the list from the heroku help commands, so it should stay up to date with new commands. Your app names and git remotes are also autocompleted.

For zsh, see zsh-completions.

Only tested on Mac.

Prerequisites

Install bash-completion and add it to your .bash_profile before you install this.

brew install bash-completion

Install

heroku plugins:install git://github.com/stefansundin/heroku-bash-completion.git

Run heroku completion:init to get the command to put in .bash_profile, usually:

source "$HOME/.heroku/plugins/heroku-bash-completion/heroku-completion.bash"

Open a new terminal for the completion to take effect, or run the source command directly. The first time you use it, it will generate a list of commands that it caches in your ~/.heroku directory. The first time you tab --app or -a, it will fetch a list of your apps. You can generate new lists by running heroku completion:gen. Rake tasks are also cached, e.g. heroku run rake .... Heroku plugins are also completed, but not cached anywhere.

When you install new plugins or upgrade to a new version of the heroku toolbelt, run heroku completion:gen to update the cached list of commands. You can run heroku completion:apps to only generate a new list of apps.

It might be convenient to set heroku completion:apps to run as a cron job to periodically update the list, or you can have it run when you login.

Usage

heroku completion
heroku completion:init
heroku completion:gen
heroku completion:apps
heroku completion:clean
heroku completion:version

Update

heroku plugins:update heroku-bash-completion

Uninstall

heroku plugins:uninstall heroku-bash-completion
rm ~/.heroku/completion*

Changelog

RSS Release feed

0.1 - 2014-10-18 - diff:

  • First release.