Matthew Nicholson
Matthew Nicholson
This should probably be handled by the readline library. Otherwise the user will have to manually disable the echoing of characters and handle escape codes and stuff themselves (this is...
So there is actually a `getpass()` function in libc which is obsolete. It is recommend to use the termios functions to manually disable echoing and stuch. There is an `rpassword`...
I tested using liner with rpassword to read passwords and it works as expected. That's probably the best route here. Example: https://gist.github.com/iamcodemaker/4e13516c8c82d9cdfcd92df6fc8f0b5a
Yes, that's how the example code I linked works. Initially I thought it belonged in liner, but now I'm thinking just using rpassword directly would work better.
`Termion` also has a [read_passwd](https://docs.rs/termion/1.5.1/termion/input/trait.TermRead.html#method.read_passwd) method if you wanted to avoid additional dependencies.
Tough call. I think the current way is more rustic vs having a trait.
I don't think pressing ctrl-c will generate a signal. I think liner can just detect that `c` was pressed when `ctrl` was pressed. We just need a way to relay...
How do other readline libs handle this?
Created a PR for this: #42
No signals are raised when `ctrl-c` is pressed on my osx machine. I think this is because the terminal is in raw mode causing all key presses to be sent...