4 ms·
Until very recently windows terminal couldn’t select a wrapped line without adding \r\n in between… And it still messes up default color brightness making grey
by wruza 4y ago
Until very recently windows terminal couldn’t select a wrapped line without adding \r\n in between… And it still messes up default color brightness making grey text white until something else messes it back.
- jiggawatts 4y agoUntil recently "cls" and "Clear-Host" in Windows Terminal used to actually clear everything so you couldn't accidentally scroll back and see junk that you wanted to get rid of. The Windows Terminal team copied the UNIX terminal "standard" of only clearing the current viewport. Now, scrolling back "works" in the sense that it shows partial(!) output from previous commands. Say you have a script that produces 47 screens worth of output, and what you want to see is somewhere in the middle. You can't judge this visually because the scrollbar is inaccurate and there may be other history. Before you could just 'cls', re-run the script after a change, scroll back, and see only the updated output. Now, if you do this you'll get 46 screens of superficially identical looking output, with 47 of the output you wanted to see appended to it. This is super confusing. It has confused me. I've seen other admins be confused as well and copy-paste the wrong thing. The Microsoft Terminal team debated this and decided to do the wrong thing on purpose and copy the "Linux way" to pander to Linux admins on Windows. Meanwhile if you go back through the old newsgroups and mailing lists, the same argument was had by Linux people as well, with the same logic I just outlined. They also decided to do the wrong thing. Why? Because they were pandering to UNIX admins coming across to Linux. Why does UNIX do this? Because of an error in the coding. That is all. That's why the shiny new Windows Terminal is broken now, to copy an error that was already a copy of an error.
- Arnavion 4y agoncurses' clear defaults to clearing scrollback and you have to use `-x` to not clear it. I would think most distros use it. Busybox clear does not clear scrollback nor does it provide an option to do it. But for example on Alpine where Busybox clear is the default, the ncurses package can be installed to get the ncurses clear.
- aftbit 4y ago"clear" clears scrollback on my machine. alacritty + zsh on arch linux.
- pjmlp 4y agoAnother thing, is how now we tend to get CLI scripts for what used to be nice Visual Studio wizards. Microsot teams are tainting the Windows developer experience trying to cater to the crowd that has been buying Apple gear for GNU/Linux development.
- copperx 4y agoAnd that's good
- pjmlp 4y agoNot from point of view of Windows devs used to what "Developers, Developers, Developers" meant in practice.
- jrumbut 4y agoAnd the worst part is those of us who resemble your remark just download Git Bash et al because Powershell is too verbose anyway.
- pjmlp 4y agoBecause parsing text is so great.
- wruza 4y agoWhy does UNIX do this? Because of an error in the coding. That is all. Are you saying this specifically or metaphorically? Because I suspect that there was a rationale behind that decision. See also https://man7.org/linux/man-pages/man1/clear.1.html https://man7.org/linux/man-pages/man1/clear.1.html which explicitly states that it clears scrollback iff a terminal has a specified capability. Which windows terminal being of CRT origin should have. I think the issue here is actually an intersection of some terminal nuance and windows team who blindly copied the behavior that some linux guys were used to because this knowledge was buried under their gnome defaults. Iow, no need to blame unix and linux, blame those who picked one (stupid) mode of many and used that as the only mode of operation.