• 0 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: June 5th, 2023

help-circle

  • whole lot of annoyance over so-called anti-establishmentarianists who rather talk Linux for months on end with no actual plan of moving even though they talk as if they have one, that fucking ticks me off, and I feel as if it’s everywhere because people wanna fit in

    Yeah you’re keeping it real, fucking posers amiright? You’re sooo mad at all these phonies just trying to fit in.

    I seriously hope you’re just a teenager because that means you’re going to grow out of this phase, otherwise this is just sad.




  • ls inherits stdout/stderr from bash, and then writes directly to that, which in this scenario is the pty (pseudo teletype) device created by xterm. Bash isn’t involved in forwarding that. The ls output goes via the pty device driver in the kernel straight to xterm, bash doesn’t see it.

    In order for what you’re suggesting to work, bash would have to open up it’s own pty, which it doesn’t. But something like tmux does. Hence why I wrote you’d need to make a shell/tmux hybrid. The bash/tmux hybrid could then intercept the ls output and forward it to the xterm pty, like you are imagining. But tmux (or screen) are complex pieces of software, basically full terminal emulators. Adding an overlay (or whatever) feature to xterm for bash to use would surely be less complicated. Though I guess with how many terminal emulators there are, you’d need to convince at least the most popular ones to implement that (good luck). So both ideas, while theoretically possible, seem like non-starters. Too much thankless work and plenty of pushback I imagine.



  • This doesn’t seem like something a shell can implement properly. Well, except maybe you could make a shell+tmux hybrid, but that’s a terminal emulator running inside of a terminal emulator then (as are tmux and screen).

    The problem is that when you run e.g. ls, it prints directly to the terminal. The shell could, once ls finishes, reposition the cursor to the top and then print over the ls output, but that’ll just overwrite part of the ls output and ruin the scrollback buffer, which would be annoying.

    I think if you really wanted to implement this properly you’d need some sort of new feature (like an overlay layer maybe), implemented by the terminal, and then the shell would have to be patched to make use of that.