Closed nmlt closed 3 years ago
Hello @nmlt, thanks for reporting ! :+1: I do not currently have time to look into this because it seems non-critical, so I'm going to close the issue. Feel free to open a PR with a fix and a test case if this bothers you.
@nmlt Actually, I might think this is problematic. Currently rpassword
does not handle signals. But I'm working on some updates in this repo: https://github.com/conradkleinespel/duck. It makes use of the Drop
trait to restore the terminal, which should be more reliable.
I'm not 100% sure that this repo is usable from the outside yet, but you could try using rpassword
like this:
[dependencies]
rpassword = { git = "https://github.com/conradkleinespel/duck.git" }
I'll try to publish an updated version within a few weeks (want to test a bit more first).
Using rpassword from your mono repo worked fine for me, but the problem persisted.
You're absolutely right that it is not really a very pressing problem and I have no idea what could cause this. I just found it a curious problem.
Something I forgot to mention: it doesn't happen on bash on macOS (v3.2.57(1)) and also not on linux zsh version 5.0.2
Good to know that the monorepo works, thanks a lot for testing! :+1:
Back to this bug, I'm really not sure what could be causing it and unfortunately I don't have access to a Mac. If you want to make a PR with a test case I'll be happy to review it, for now I'm going to close this issue.
I created a new user, installed minimal rust and wrote this little program:
Between the first command and the next there is no empty line. Afther the "Hello, world!" print, I pressed Ctrl+C. When I then pressed enter there is an empty line between the two prompt lines.
I tested zsh 5.7 and 5.8 (via brew) on macOS Catalina, both Terminal.app and iTerm2.app.
On the other hand it's not really problematic to fix it, just open a new tab.