3 ms·
This scared me the first time I tried it because the output was perfectly sized to my terminal. I couldn't fathom how it was possible for the server to know my
by jtokoph 6y ago
This scared me the first time I tried it because the output was perfectly sized to my terminal. I couldn't fathom how it was possible for the server to know my terminal width.
It turns out my terminal was set at 125 characters wide and wttr.in outputs a 125 character width display.
- Drdrdrq 6y agoCurious - wouldn't it be possible to output terminal escape characters to perform some "magic" like moving at the end of the line? Or does curl protect users by not outputting them? (I think not, because fetching a binary file by mistake sometimes garbles the output)
- igor_chubin 6y agoIt is possible, but it brings nothing, because you don't only need to move to the end of the line but print something in between, and for that the server mush know the width of your terminal