News for hackers. Stuff that matters.
Re:The TTY demystified (2008) by angdis on Saturday August 15, 2015 @07:22AM (#10065089)
OK, but you have to admit it does the job and few (none?) people complain about the limitations of VT100 terminal emulation.

If we could start from scratch what would a contemporary TTY be like? Would it be better in terms of functionality, multi-platform capability? What would be the advantage?

Re:The TTY demystified (2008) by philh on Saturday August 15, 2015 @08:05AM (#10065159)
I don't know if it's fair to describe this as a limitation of VT100 (and I haven't RTFA yet), but some things that AFAIK terminals don't get right yet:

- Screen's scrollback buffer and my terminal's scrollback buffer don't know about each other. If I swap screen tabs frequently, my terminal scrollbar becomes useless. OTOH, if I use a tabbed terminal, I'm guessing it would use a different VT100 in each tab and that wouldn't work very well with screen.

- I'd like to be able to drop a marker in my bash prompt, and easily scroll back to the top of the previous command.

- For that matter, I'd like to be able to selectively hide the output of previous commands, and when I want to look at it again I'd like to be able to view it in less instead of just unfolding it in-place.

Re:The TTY demystified (2008) by joosters on Saturday August 15, 2015 @08:43AM (#10065231)
The scrollback buffer problem is annoying, but I just don't think there's a good solution to it.

screen (and tmux) basically store their own scrollback. The advantage here is that you can then page through the line history on another terminal or even another computer. The downside is that that your terminal (xterm/iterm/whatever) has to decide what to show when you page up. It has no way to read screen's internal scrollback, so it can either show you old non-screen lines, or hide the scrollback entirely. Switching into/out of screen will just add to the confusion.

(I think some terminals will hide the scrollback history when they spot the TTY in curses-style mode, and only bring it back when that process quits?)

One other annoyance for me is the behaviour of scrollback with a command like 'less' or 'more'. If you are paging down through a file, then scroll back up, some terminals will show you earlier lines of the file you are viewing, while others show you 'pre-less' scrollback.

Re:The TTY demystified (2008) by philh on Saturday August 15, 2015 @09:03AM (#10065267)
There may not be a good solution currently, but I don't believe that no good solution is possible even in theory. Which makes me wonder if the VT100 paradigm is holding us back.

Like, if a VT100 understood the concept of tabs natively, it seems like this wouldn't be a problem. Screen could just map its windows onto VT100 tabs, and the terminal would know what to do with that.

I don't know if adding tabs to VT100 emulators would be remotely feasible, or a good idea if it was, but I expect there's something in this space that would be an improvement on what we have.

Re:The TTY demystified (2008) by peteri on Saturday August 15, 2015 @10:29AM (#10065446)
Eh. A real VT100 should understand tabs, you can set them with 'Esc H' oddly the DEC manuals don't say what the effect of resetting tabs would be (I'd guess it defaults to multiples of 8 characters).
Re:The TTY demystified (2008) by yuubi on Saturday August 15, 2015 @06:44PM (#10067241)
Not \x08 tabs, but tabs like recent firefox and chrome use (as if you had several terminal windows with separate ptys and screen contents, but all in one window-manager window).
Re:The TTY demystified (2008) by mikekchar on Saturday August 15, 2015 @08:35AM (#10065219)
Italics. And even worse (because it is more common), bold. Hey, let's throw in "I want to have something bold and italics and this colour".

Possibly I'm rare, but I'm frustrated very frequently...

Re:The TTY demystified (2008) by jimktrains2 on Saturday August 15, 2015 @08:38AM (#10065220)
That isn't the terminal, though, that's the software using it. A VT100 could be made to do any of that.
Re:The TTY demystified (2008) by gnachman on Saturday August 15, 2015 @01:21PM (#10066025)
Try the new iterm2 beta. It does the first two items in your list (tmux integration and shell integration)
Re:The TTY demystified (2008) by na85 on Sunday August 16, 2015 @01:02AM (#10068023)
>If we could start from scratch what would a contemporary TTY be like?

It'd be a monstrosity written in javascript with merely adequate performance on an i7 and no backwards compatibility.

Re:The TTY demystified (2008) by panic on Saturday August 15, 2015 @05:37PM (#10067008)
If we could start from scratch what would a contemporary TTY be like?

https://www.destroyallsoftware.com/talks/a-whole-new-world complains about the limitations of VT100 and has some ideas for (GUI) terminal improvement.

Re:The TTY demystified (2008) by skriticos2 on Saturday August 15, 2015 @08:04AM (#10065158)
Uniformity and documentation. If you want to do something fancy with the terminal (ncurses like) and try go get into the topic, you'll find a dozen different standards that add bits and peaces with only very cryptic documentation and not much example code. It's quite frustrating.