dev-master
9999999-dev
MIT
The Requires
- composer-plugin-api ^1.0
- stecman/symfony-console-completion ~0.7.0
This is an experimental hack to add Symfony BASH auto complete to Composer via a plugin. It's a pretty slimy hack, but it works without editing Composer's code., (*1)
, (*2)
Install the plugin:, (*3)
composer global require stecman/composer-bash-completion-plugin dev-master
Generate code to register a completion hook for your shell and Composer configuration:, (*4)
source $(composer config home --global)/vendor/stecman/composer-bash-completion-plugin/generate-hook
Add the registration code to your shell profile:, (*5)
~/.bash_profile
~/.zshrc
This hacky plugin injects an additional command into the Composer application at runtime. When the plugin in this package is activated and the command line starts with composer depends _completion
, the plugin effectively reboots the application with the completion command added, and drops depends
from the command line so that _completion
becomes the command argument. This used to work without piggy-backing on a command, but an update to composer stopped the original method working (#8)., (*6)
MIT