diff options
author | Lucid One <LucidOne@users.noreply.github.com> | 2018-03-07 01:58:00 -0500 |
---|---|---|
committer | Tad Fisher <tadfisher@gmail.com> | 2018-03-06 23:29:58 -0800 |
commit | 742aaaab15a78bce52fbe5bed4bcc29cdfca7ee8 (patch) | |
tree | 767179ae93afd0d3f5d6e04cb5e5631221453128 | |
parent | 694d10db8fb714d1dc69ec50c0298833a7922088 (diff) | |
download | pass-otp-742aaaab15a78bce52fbe5bed4bcc29cdfca7ee8.tar.gz pass-otp-742aaaab15a78bce52fbe5bed4bcc29cdfca7ee8.zip |
Added support for `pass otp --version`
-rwxr-xr-x | otp.bash | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -16,6 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # [] +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 "$@" ;; |