2
1
mirror of https://github.com/kdabir/has.git synced 2024-09-18 17:01:29 +02:00
has/README.md
codetriage-readme-bot 90e3dfdd68 Add CodeTriage badge to kdabir/has
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/kdabir/has/badges/users.svg)](https://www.codetriage.com/kdabir/has)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly 4 months ago, [@kdabir](https://github.com/kdabir) added this project to CodeTriage in order to start contributing.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-03 15:52:36 -06:00

1.9 KiB

has

has checks presence of various command line tools on the path and also reports their installed version

Build Status Open Source Helpers

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 exits 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://git.io/_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://git.io/_has | bash -s"

And use it

$ has git
✔ git 2.14.1

command not understood by has?

Let's say $ has foobar returns foobar not understood, because has may not have whitelisted foobar.

In such cases, pass HAS_ALLOW_UNSAFE=y has foobar. This is should still check for existance of foobar and tries to detect version as well.

Demo

asciicast

Contributing

Build Status

  1. Star the repo, tweet about it, spread the word
  2. Update the documentation (i.e. the README file)
  3. Adding support for more commands
  4. Adding more features to has