Added support for `pass otp --version`

This commit is contained in:
Lucid One 2018-03-07 01:58:00 -05:00 committed by Tad Fisher
parent 694d10db8f
commit 742aaaab15
1 changed files with 7 additions and 0 deletions

View File

@ -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 "$@" ;;