3 ms·
What's a page? I set all my terminals to 22x23. Will --help run a few quick ioctls to calculate screen size? But yeah, agree. It's way more preferable to have
by NoZebra120vClip 3y ago
What's a page? I set all my terminals to 22x23. Will --help run a few quick ioctls to calculate screen size?
But yeah, agree. It's way more preferable to have surprise output on stderr than surprises mingling with stdout, and it's good to be prepared for that.
Frankly, I nearly quit piping to a pager when GUI terminal backscroll became easy and infinite.
- ilyt 3y ago> What's a page? 80x25 > I set all my terminals to 22x23. You are a very silly man and silliness should not be catered for. > Will --help run a few quick ioctls to calculate screen size? Your terminal can wrap text around just fine. If it can't, ask for refund.
- gumby 3y agoYou sound like someone who’s never programmed on an ADM-3a much less an ASR-33
- lytedev 3y agoYou got us <3
- deleted 3y ago[deleted]
- NoZebra120vClip 3y agoIn college we used to print out "one-page" ASCII art on the LPs. Naturally, it could get rather risqué. But I would just stare into them, marveling at the ingenuity. Of course I'd already been into it awhile, thanks to C64 Print Shop. Also my father produced tonnes of scratch paper in narrow strips. I found a way to weave them into a perpetually-growing "tractor-feed snake" which I placed in a padded crib and brought to grade school to show off. I would typically juggle a few bits and bobs to attract even more attention...
- ykonstant 3y agoGot any links? You know, to revel in the ingenuity.
- NoZebra120vClip 3y agoSure, what is the standard URI format for a really long piece of tractor feed paper? I'm sure you could dig around into my hometown's landfill for awhile. They're only 30 years sediment. I'll send you a tarp, shovel, duct tape to stick the pages back together, and my sister's old clothes to wear while you work. DM for deets.
- an-unknown 3y agoActually the ADM-3A automatically wraps overflowing text similar to what you would expect from a terminal unless you disable the "Auto NL" switch and it is 80x24 characters unless you got the basic 80x12 variant without the "24 lines" option.
- _kst_ 3y agoI think the suggestion was not that the tool should page the output, but that the user can easily do so: tool [args] 2>&1 | less Presumably "less" knows how big your terminal is.
- NoZebra120vClip 3y agoBut in an ideal world, if every tool is careful to restrict it to one page or less, you'd literally never need a pager anymore. Alternatively, tools could build in pagers for fewer pipeline surprises, like the all-encompassing systemd. Even better, I could envision a framework where any tool that produces output can be automatically subject to pagination, with auto terminal detection and the whole bit. Think of libreadline but for output. You could thereby eliminate plenty of ad hoc hacks.
- fragmede 3y agobtw, as of Bash 5.0 tool 2>&1 | less can be replaced by tool |& less
- mdaniel 3y ago$ /bin/bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21) on the off chance anyone was curious/didn't remember. Yes, I have $HOMEBREW_PREFIX/bin/bash and it's 5.2.15 In that same vein, I wondered if that syntax was supported in zsh since modern macOS went whole hog and ... I gained one more pebble on the huge pile of steaming turds why I detest zsh $ /bin/zsh -exc '{ echo alpha; echo beta; } |& wc -l' +zsh:1> wc -l 4 dafuq? $ /bin/zsh -exc '{ echo alpha; echo beta; } |& cat' +zsh:1> cat +zsh:1> echo alpha alpha +zsh:1> echo beta beta oh, aren't you just the funniest. har. de. har.
- NoZebra120vClip 3y agoI'm not sure that I follow: you chose options "-exc" so: XTRACE (-x, ksh: -x) Print commands and their arguments as they are executed. So if you use "zsh -ec" does it still surprise you? -x is the most invaluable tool in my shell-debugging toolkit. It is great to see every command evaluated and run alongside the script output itself. I use it multiple times per day at work.