Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69886yOkay, how would you know how many characters you've deleted if you're at a password prompt that doesn't even display characters?
-
@Alice yep, bcz some apps read kbd_dn or kbd_up only. Without looping events on long presses. And some terminals do that too. For instance terminal over remmina-vnc over remmina-rdp.
-
@DrDonkey depending on current xterm or vt state you might just end up typing yet another char --- ^U (\x15)
-
@DrDonkey I'm not sure you got me. Control chars can be intercepted by VT. Whether they are or not depends on VT configuration. All cli applications leverage it heavily to provide a nice interface: non-visual pw inputs, ctrl-u, ctrl-d and other combinations, colors on terminal, etc. All these are achieved by changing VT configurations and sending it control chars.
If you did cat /dev/random there's a giid chance your ^u will no longer work. It's because some random byte will change VT's configuration to treat ^u as a normal char rather that a control char.
Some cli apps might try to read all bytes from stdin, including the control ones, like ^u. Some apps might not do that, but previously ran app changed vt config before exitting. Eithet way c-u won't work as you'd expect. So don't get used to oh-so-handy shortcuts as they might stop working when you need them the most.
Related Rants
Realizing...
joke/meme
terminal
meme