nubs / which-cli
A symfony/console command similar to the standard which command.
Requires
- php: ~5.4
- nubs/which: ~1.0
- symfony/console: ~2.5
Requires (Dev)
- brianium/habitat: ~1.0
- phpunit/phpunit: ~4.0
- squizlabs/php_codesniffer: ~1.5
Suggests
- brianium/habitat: For better access to environment variables (e.g., for mocking).
This package is auto-updated.
Last update: 2024-10-12 21:50:58 UTC
README
A PHP symfony/console command similar to the standard which command.
Requirements
This script requires PHP 5.6, or newer.
Installation
This package uses composer so you can install it using composer. Composer can install the command globally using:
composer global require nubs/which-cli
This will install it to your $COMPOSER_HOME
directory (typically
$HOME/.composer
). The which
binary will be symlinked to
$COMPOSER_HOME/vendor/bin/which
(e.g., $HOME/.composer/vendor/bin/which
).
Usage
The included which
executable works much like the standard which utility. It
takes an arbitrary number of parameters and outputs the path to each of them.
$ which more vim foo /bin/more /usr/bin/vim foo not found
For windows users, composer will create a which.bat
script in
its bin directory that can be executed in much the same way as on a POSIX
system. Alternatively, a which.bat
script is included. You may need to add
the bin
directory from this repository to your PATH
environment variable to
be able to access the command globally.
License
which-cli is licensed under the MIT license. See LICENSE for the full license text.