11 lines
299 B
Fish
11 lines
299 B
Fish
function gt --description "Get TOTP token with pass-otp"
|
|
if type -qf pass
|
|
pass ls totp | fzf --ansi --exact | sed 's/[^a-zA-Z0-9]//g' | read -l result
|
|
if test -n "$result"
|
|
pass otp -c totp/$result
|
|
end
|
|
else
|
|
echo "pass is not installed"
|
|
end
|
|
end
|