Go to file
Kunal Dabir 4dddf27108 release 1.0
- added more commands, shuffle the order
- added installation script
- using make to run tests
- update README with installation steps and usage
2017-08-29 12:01:11 +05:30
.editorconfig release 1.0 2017-08-29 12:01:11 +05:30
.gitattributes adding usual suspects for project root 2015-02-12 19:28:24 +05:30
.gitignore adding usual suspects for project root 2015-02-12 19:28:24 +05:30
.hastest.bats udpate test names and tool names 2017-08-29 09:23:21 +05:30
.travis.yml release 1.0 2017-08-29 12:01:11 +05:30
LICENSE update license 2017-08-28 21:11:51 +05:30
Makefile release 1.0 2017-08-29 12:01:11 +05:30
README.md release 1.0 2017-08-29 12:01:11 +05:30
has release 1.0 2017-08-29 12:01:11 +05:30

README.md

has

has helps you check presence of various command line tools on path.

How ?

Download the has file. There is no dependency apart from bash itself

$ has node npm java git gradle 
✔ node 8.2.1
✔ npm 5.3.0
✔ java 1.8.0
✔ git 2.14.1
✔ gradle 4.0.1

If everything is good has exists with status code 0. The status code reflects number of commands not found on your path.

$ has node go javac
✔ node 8.2.1
✔ go 1.8.3
✘ javac

And echo the status:

$ echo $?
1

Installing

Just download the has script in your path.

git clone https://github.com/kdabir/has.git && cd has && make install

If you are lazy, you can run has directly off the internet as well:

curl -sL https://raw.githubusercontent.com/kdabir/has/master/has | bash -s git node npm
✔ git 2.14.1
✔ node 8.2.1
✔ npm 5.3.0

And if that's too much of typing every time, setup an alias

alias has="curl -sL https://raw.githubusercontent.com/kdabir/has/master/has | bash -s"

And uses it

$ has git
✔ git 2.14.1

Build Status