mfa (241B)
1 #!/bin/sh 2 3 service="$1" 4 if [ -z "${service}" ]; then 5 pass mfa 6 exit 0 7 fi 8 9 code="$(pass mfa/"${service}")" 10 if [ -z "${code}" ]; then 11 err "unrecognized service: ${service}" 12 exit 1 13 fi 14 15 oathtool -b --totp "${code}" | tee /dev/tty | xclip