2
1
mirror of https://github.com/kdabir/has.git synced 2024-11-10 21:26:50 +01:00

support httpie

This commit is contained in:
Kunal Dabir 2017-10-14 12:28:23 +05:30
parent 2a75f7e763
commit b1fb012bd7

16
has
View File

@ -55,23 +55,26 @@ __detect(){
jdk) command="javac" ;;
nodejs) command="node" ;;
goreplay) command="gor";;
httpie) command="http";;
*) command=${name} ;;
esac
case ${command} in
# commands that need --version flag
bash|zsh) __dynamic_detect--version ${command} ;;
git|hg|svn|bzr) __dynamic_detect--version ${command} ;;
gcc|make) __dynamic_detect--version ${command} ;;
curl|wget|http) __dynamic_detect--version ${command} ;;
vim|emacs|nano|subl) __dynamic_detect--version ${command} ;;
bats|tree|ack|autojump) __dynamic_detect--version ${command} ;;
jq|ag|brew) __dynamic_detect--version ${command} ;;
node|npm) __dynamic_detect--version ${command} ;;
ruby|gem|rake|bundle) __dynamic_detect--version ${command} ;;
python|python3) __dynamic_detect--version ${command} ;;
perl|php) __dynamic_detect--version ${command} ;;
groovy|gradle|mvn) __dynamic_detect--version ${command} ;;
bash|zsh|curl|wget) __dynamic_detect--version ${command} ;;
vim|emacs|nano|subl) __dynamic_detect--version ${command} ;;
bats|tree|ack|autojump) __dynamic_detect--version ${command} ;;
jq|ag|brew) __dynamic_detect--version ${command} ;;
gcc|make) __dynamic_detect--version ${command} ;;
# commands that need -version flag
ant|java|javac) __dynamic_detect-version ${command} ;;
@ -140,7 +143,8 @@ __detect(){
if [ "$#" -eq 0 ]; then
# print help
BINARY_NAME="has"
echo "${BINARY_NAME} v1.0"
VERSION="v1.1.0"
echo "${BINARY_NAME} ${VERSION}"
echo "USAGE: ${BINARY_NAME} <command-names>.."
echo "EXAMPLE: ${BINARY_NAME} git curl node"