Live data from Hacker News

Clear Your Terminal in Style

adammusciano.com

121–130 of 133 posts

Re: Clear Your Terminal in Style

#121
post #35
post #22

Earlier quoted context omitted.

A lot of people swear by stuff like iTerm2, but I'm almost a little ashamed to admit that even though I have iTerm configured to my taste, I often still reach for macOS' native terminal. It's not gloriously beautiful or anything (basic Zsh with powerline for the shell), but it just seems to work great without the frills. Little shortcuts that think of stuff like this without any configuration (iTerms is impressively…

The fact that Ternimal.app and iTerm2 use different keyboard shortcuts for clearing scrollback buffer (⌥⌘K vs ⇧⌘K) is a constant frustration of my spotty use of Terminal.app. I would instinctively hit the iTerm2 shortcut, which brings up a connect to server panel or something.

> The fact that Ternimal.app

That typo has a nice program of its own: https://github.com/p-e-w/ternimal

Re: Clear Your Terminal in Style

#123
post #22

Earlier quoted context omitted.

A lot of people swear by stuff like iTerm2, but I'm almost a little ashamed to admit that even though I have iTerm configured to my taste, I often still reach for macOS' native terminal. It's not gloriously beautiful or anything (basic Zsh with powerline for the shell), but it just seems to work great without the frills. Little shortcuts that think of stuff like this without any configuration (iTerms is impressively…

> A lot of people swear by stuff like iTerm2 Actually, I've been using Terminal for years. I usually try to use default apps as much as possible (Safari, Mail, Notes, Terminal) to reduce configuration overhead. I switched to iTerm2 a few days ago after reading an article on HN... not sure if it worth the change, but haven't tried anything fancy yet. What would be the killer feature of iTerm2?

Drop down with global shortcut (I use control + ‘)

https://www.marcjenkins.co.uk/drop-down-terminal-with-iterm2...

Re: Clear Your Terminal in Style

#124
My new favourite way: ttyfire

https://i.imgur.com/c0VIJYg.mp4

Video is of it running in gnome-terminal, where the terminal window is scaled right down with ctrl-minus.

Source is here: https://github.com/dmo9000/ttyfire

So far its been able to run on Linux, FreeBSD, Solaris and OpenBSD with minor patches. NetBSD xterm doesn't seem to support Unicode for some reason.

This was inspired by the Javascript DOOM fire effect that was posted here a bit over a year ago.

https://news.ycombinator.com/item?id=18833765

Re: Clear Your Terminal in Style

#125
post #11

I like the VT100 demo. I wonder if there are demos for the more advanced color VT340 terminals?

ANSI demos would be similar to your request, but use a different character set (IBM PC's default character mode--code page 437).

I guess it is to late and nobody will read this. But anyway.

A couple of years ago i bought a new old stock DEC VT340 terminal, complete with a set of manuals. It can do much more than ANSI. Wikipedia says it can to bitmap and vector graphics "ReGIS, Sixel and Tektronix 4010". I wonder if there are scripts or tools to demo those capabilities.

Re: Clear Your Terminal in Style

#126
post #67
post #11

I like the VT100 demo. I wonder if there are demos for the more advanced color VT340 terminals?

They actually aren't VT100 demos, if you look at them. Several of them use SGR control sequences to set colour. I suspect that quite a few of them would not have worked on an actual VT100 series terminal.

I guess it is to late and nobody will read this. But anyway.

A couple of years ago i bought a new old stock DEC VT340 terminal, complete with a set of manuals. It can do much more than ANSI. Wikipedia says it can to bitmap and vector graphics "ReGIS, Sixel and Tektronix 4010". I wonder if there are scripts or tools to demo those capabilities.

Re: Clear Your Terminal in Style

#127
post #104

Earlier quoted context omitted.

The reset command should clear the scrollback buffer. On older terminals where you'd get a garbled screen if you accidentally cat a binary file, it will give you your ASCII back.

Trying it just now on konsole, it does not. Whether that's because your terminal is following standards or because your terminal is interpreting a terminal command that doesn't actually say anything about scrollback to also clear scrollback, I don't know, and await anyone who does to answer that question. My gut is that the terminal protocol would know nothing about scrollback and thus not have a "clear scrollback" c…

Your "gut" is wrong. It's ED 3.

Re: Clear Your Terminal in Style

#128
post #17

I’d just settle for macOS’ Terminal.app’s ⌘-K, that resets the terminal, and clears all the screen including scroll back window. Something so basic I have it in muscle memory but I haven’t found the equivalent in Linux terminals.

printf "\033c"? I don't know if it resets, but it does clear the scroll buffer. I use it before compiling (printf "\033c"; make) so that I don't have to search for the first error or warning, I can just scroll all the way up.

As I said elsewhere in this discussion, use DECSTR instead of RIS unless you really need all of the things that RIS does to actual terminals, like performing selftests and resetting the serial connection. Habitual use of RIS is a bad habit to get into.

Re: Clear Your Terminal in Style

#129
post #127
post #104

Earlier quoted context omitted.

Trying it just now on konsole, it does not. Whether that's because your terminal is following standards or because your terminal is interpreting a terminal command that doesn't actually say anything about scrollback to also clear scrollback, I don't know, and await anyone who does to answer that question. My gut is that the terminal protocol would know nothing about scrollback and thus not have a "clear scrollback" c…

Your "gut" is wrong. It's ED 3.

It's a common feature, but not formally standardized.

ED 3 isn't actually in the [ECMA-048] spec.

It was an xterm feature introduced in June 1999. Several terminal developers later adopted the feature. In April 2011, a Red Hat developer submitted a patch to the Linux kernel, modifying its console driver to do the same thing.

So it's not a formal standard, but it's universal on Linux since 3.0 and many terminal emulators have adopted it.

This history is covered in [clear(1)] from the ncurses project.

[ECMA-48]: http://www.ecma-international.org/publications/files/ECMA-ST...

[clear(1)]: http://man7.org/linux/man-pages/man1/clear.1.html#HISTORY

EDIT: Fix wording and formatting.

Post reply on HN