nubs/which-cli

A symfony/console command similar to the standard which command.

v1.0.0 2014-07-10 00:29 UTC

This package is auto-updated.

Last update: 2024-11-12 21:59:05 UTC


README

A PHP symfony/console command similar to the standard which command.

Build Status Scrutinizer Code Quality Code Coverage

Latest Stable Version Total Downloads License

Dependency Status

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.