2022-12-15 05:29:28 +01:00
|
|
|
function gt --description "Get TOTP token with pass-otp"
|
|
|
|
if type -qf pass
|
2022-12-25 08:37:12 +01:00
|
|
|
pass ls totp | fzf --ansi --exact | sed 's/[^a-zA-Z0-9]//g' | read -l result
|
2022-12-15 05:29:28 +01:00
|
|
|
if test -n "$result"
|
|
|
|
pass otp -c totp/$result
|
|
|
|
end
|
|
|
|
else
|
|
|
|
echo "pass is not installed"
|
|
|
|
end
|
|
|
|
end
|