From b1fb012bd717bb275018ac6fc0a676c060bfb796 Mon Sep 17 00:00:00 2001 From: Kunal Dabir Date: Sat, 14 Oct 2017 12:28:23 +0530 Subject: [PATCH] support httpie --- has | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/has b/has index d33ecc6..41231fa 100755 --- a/has +++ b/has @@ -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} .." echo "EXAMPLE: ${BINARY_NAME} git curl node"