diff --git a/zsh.d/zshfunctions/x509 b/zsh.d/zshfunctions/x509 index a68810c..885fce1 100644 --- a/zsh.d/zshfunctions/x509 +++ b/zsh.d/zshfunctions/x509 @@ -1,11 +1,11 @@ usage() { echo "x509 " echo "x509 -r " - exit 0 } [ $# -eq 0 ] && usage +help=0 remote=0 while getopts ":hr:" arg; do @@ -14,10 +14,10 @@ while getopts ":hr:" arg; do remote=1 host=$OPTARG ;; - h) usage + h) help=1 ;; esac done - +[ $help -eq 0 ] && usage && return [ $remote -eq 0 ] && openssl x509 -in $* -noout -text [ $remote -eq 1 ] && openssl s_client -connect $host < /dev/null | openssl x509 -noout -text diff --git a/zsh.d/zshfunctions/x509.zwc b/zsh.d/zshfunctions/x509.zwc index ea4a1e5..a5166d5 100644 Binary files a/zsh.d/zshfunctions/x509.zwc and b/zsh.d/zshfunctions/x509.zwc differ