From 38aa163634d276bbda5ea02a32100f36abf90f9b Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 22 Oct 2022 17:28:20 -0400 Subject: [PATCH] Apply defaults the oathtool command when get-ing codes --- otpish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otpish b/otpish index f758c98..8d3fa23 100755 --- a/otpish +++ b/otpish @@ -72,7 +72,7 @@ if [ "${COMMAND}" = "get" ]; then if [ "$(echo ${i} | cut -d'=' -f1)" = "digits" ]; then digits=$(echo ${i} | cut -d'=' -f2); fi if [ "$(echo ${i} | cut -d'=' -f1)" = "period" ]; then period=$(echo ${i} | cut -d'=' -f2); fi done - oathtool --totp -b -s "${period}s" -d ${digits} ${secret} + oathtool --totp -b -s "${period:-30}s" -d ${digits:-6} ${secret} exit fi