PHPUnit shell completion for Bash
The phpunit-completion.bash
script provides shell completion in bash for PHPUnit.
The completion routines support completing all options and arguments provided by PHPUnit.
Installation
- Ensure you installed:
bashversion >= 4.1bash-completionversion >= 2.0grepin$PATHawkin$PATHcutin$PATHsedin$PATHtrin$PATH- … and last but not least,
phpunitversion >= 6.4 of course!
- Install
phpunit-completion.bashfile:- a.) Either, place it in a
bash-completion.dfolder, like:/etc/bash-completion.d/usr/local/etc/bash-completion.d~/.bash-completion.d
-
b.) Or, copy it somewhere (e.g.
~/.phpunit-completion.sh) and put the following line in your.bashrc:source ~/.phpunit-completion.sh - c.) If you’re using MacPorts then you should take a look at my MacPorts-PHP repository.
- a.) Either, place it in a
-
Optionally nail down the php interpreter used to determine certain completions by adding the following line in your
~/.bash_profile:export PHPUNIT_COMPLETION_PHP=/path/to/your/php
Contributing
Look at the contribution guidelines
Want more?
There is a composer-bash-completion complementing the bash-completion. And - once more - if you’re using MacPorts, take a look at my MacPorts-PHP repository.
Cheers!