From 742aaaab15a78bce52fbe5bed4bcc29cdfca7ee8 Mon Sep 17 00:00:00 2001 From: Lucid One Date: Wed, 7 Mar 2018 01:58:00 -0500 Subject: Added support for `pass otp --version` --- otp.bash | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/otp.bash b/otp.bash index 447af1e..33aca78 100755 --- a/otp.bash +++ b/otp.bash @@ -16,6 +16,7 @@ # along with this program. If not, see . # [] +VERSION="1.1.0" OATH=$(which oathtool) ## source: https://gist.github.com/cdown/1163649 @@ -185,6 +186,11 @@ _EOF exit 0 } +cmd_otp_version() { + echo $VERSION + exit 0 +} + cmd_otp_insert() { local opts force=0 echo=0 from_secret=0 opts="$($GETOPT -o fesi:a: -l force,echo,secret,issuer:,account: -n "$PROGRAM" -- "$@")" @@ -398,6 +404,7 @@ cmd_otp_validate() { case "$1" in help|--help|-h) shift; cmd_otp_usage "$@" ;; + version|--version) shift; cmd_otp_version "$@" ;; insert|add) shift; cmd_otp_insert "$@" ;; append) shift; cmd_otp_append "$@" ;; uri) shift; cmd_otp_uri "$@" ;; -- cgit v1.2.3