Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 2.15 KB

README.md

File metadata and controls

47 lines (37 loc) · 2.15 KB

Which CLI

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.