3 ms·
> Terminal multiplexers like tmux need to create a pseudo-TTYs otherwise they couldn’t multiplex your terminal. [Edit: I misread the parent comment as saying m
by kps 3y ago
> Terminal multiplexers like tmux need to create a pseudo-TTYs otherwise they couldn’t multiplex your terminal.
[Edit: I misread the parent comment as saying multiplexers needed to do terminal emulation. Dtach only multiplexes (using pesudo-TTYs, of course) but unlike screen or tmux does not do terminal emulation. Original comment follows:]
That isn't strictly true; the one I use (dtach) is just a multiplexer.
- hnlmorg 3y agodtach creates pseudo-TTYs too: - https://github.com/crigler/dtach/blob/master/master.c#L53 https://github.com/crigler/dtach/blob/master/master.c#L53 - https://github.com/crigler/dtach/blob/master/master.c#L108 https://github.com/crigler/dtach/blob/master/master.c#L108 As an aside, that projects source is surprisingly easy to follow. I was able to grok it in just a couple of minutes. Kudos to the author.
- kps 3y agoYes, I misread your comment, sorry, having had my mind stuck on terminal emulation.
- hnlmorg 3y agoA PTY is an intrinsic part of terminal emulation. I think what you’re alluding to is that tmux gobbles up escape sequences (which is configurable by the way) and tracks cell positions. But as I said in another comment, the value add of tmux is its window management capabilities. That’s precisely why people like myself use it. And you cannot have that without complexity. In some edge cases that complexity causes issues, but on the whole I’m more productive for it. Saying it’s stupid that tmux does that is like saying it’s stupid that motorbikes have gears and fast patrol engines when a bmx works just as well. Sure, to someone who’s never seen a bike before they both look similar. But don’t be fooled by the fact that they both have 2 wheels because they cater to very different needs, hence their very different engineering designs.