totp-cli generate --follow should be able to quit gracefully
bs10x opened this issue · comments
totp-cli generate --follow should be able to quit gracefully.
I don't even use follow, so I can't say how people uses it. Is there a way you think it should resolve this? Like a specific key that quits, after N iterations it stops, or be brutal and catch ^C
interrupt signal?
For me, a follow (like other tools) means follow indefinitely. I think the logic, we have right now, follows what other tools are doing with their "follow", like tail
or docker logs -f
:
❯ tail -f /var/log/pacman.log
[...content...]
^C
❯ echo $?
130
❯ docker logs gitea_web.1.h02ug4bzu6oncxobhloiwzqi2 -f
[...content...]
^C
❯ echo $?
130
❯ totp-cli generate --follow MyNs MyAcc
Password: ***
081021
^C
❯ echo $?
130
Based on that, I think it works as it should. But again, I don't use --follow
with totp-cli
, I have experience only with other tools, like docker
, kubectl
, tail
, logwatcher
, etc.
I'll close this issue as I didn't get any feedback/response to my notes/question. Feel free to reopen it.