Re:Ask HN: Have you created programs for only your personal ...
by lobocinza on Wednesday April 13, 2022 @08:26PM
(#31021999)
They are annoying, specially when it's the wifi password and you have to enter it using a TV remote.
Re:Ask HN: Have you created programs for only your personal ...
by lobocinza on Wednesday April 13, 2022 @08:32PM
(#31022047)
Using head -c 16 will show an ugly '%' at the string end when not piped.
Re:Ask HN: Have you created programs for only your personal ...
by lucb1e on Friday April 15, 2022 @08:04AM
(#31039206)
Right, I forget that it's not the default to print a \n as the first character of your PS1. Doesn't make sense to me that this isn't the default, as there are quite a few commands that might not end with a newline and then it messes up the prompt position, and it doesn't impact backwards compatibility to add it now.
Re:Ask HN: Have you created programs for only your personal ...
by mkl on Thursday April 14, 2022 @06:47AM
(#31025180)
On which OS? There it is piped, but I can't make it display a "%" any way (why would it?). I'm on Linux, using head from GNU coreutils.
Re:Ask HN: Have you created programs for only your personal ...
by lobocinza on Thursday April 14, 2022 @07:14AM
(#31025351)
Arch Linux. When using Zsh the last char is always a '%'. When using Bash it does no show a '%' but there's no line break. Possibly an weird interaction with my $PS1.
Re:Ask HN: Have you created programs for only your personal ...
by mkl on Thursday April 14, 2022 @07:49AM
(#31025608)
That's definitely a Zsh thing, showing that there was no newline: https://zsh.sourceforge.io/Doc/Release/Options.html#Promptin.... It's not to do with PS1 or PROMPT, or head.
Security level: log((26+26+10)¹⁶)/log(2) ~ 2⁹⁵ (95 bits of entropy), comparable with adding those 12 extra symbols: log((26+26+10+12)¹⁶)/log(2) ~ 2⁹⁹. (Adding a character makes more sense than adding a symbol if you want more security, all else being equal of course.) If a stupid application still has outdated password requirements (thankfully this is rare among the applications I use) then one can of course add the classic ! at the end.