New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better progress bar handling for OTP #2019
Conversation
RELEASE_NOTES=[BUGFIX] Do not print OTP progress bar if not in terminal RELEASE_NOTES=[UX] Use new progress bar for OTP expiry time Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks. But I'd suggest some small changes.
RELEASE_NOTES=n/a Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Is there any release schedule? I wanna use this feature! 😆 |
Cutting new releases has become very easy. We can do one soon. Probably this week. |
This may be a silly question, but how do I stop the OTP progress bar introduced in 1.13.0 after I used the OTP code? I don't want to wait N seconds before I can run the next |
Personally I don't put OTP into my stores so I don't use this. |
Mhhh I personally never use the interactive shell, so I didn't realize we needed a way to do that. |
|
@mirkonasato I'm sorry for that inconvenience. I have just reproduced it and we definitely need a way to abort the progress bar w/o killing gopass. |
I've added a fix in #2041. 👍🏻 |
* Better progress bar handling for OTP RELEASE_NOTES=[BUGFIX] Do not print OTP progress bar if not in terminal RELEASE_NOTES=[UX] Use new progress bar for OTP expiry time Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com> * Applying code review suggestions RELEASE_NOTES=n/a Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
RELEASE_NOTES=[BUGFIX] Do not print OTP progress bar if not in terminal
RELEASE_NOTES=[UX] Use new progress bar for OTP expiry time
This is making the expiry time for OTP visually go from 0 to expiry time in terminal, but prevents printing the progress bar when not in a terminal.
I also replaced the special handling of the remaining time until expiry to use
Truncate
instead.Sadly, I'm yet again adding some "special handling" to detect whether we are in a terminal or not. We might want to heavily refactor all such things.
This fixes #2017.