4 ms·
It really never ceases to amaze me how many basic affordances terminals lack, that we hack around with bash configuration or helper tools. Of course, I know it
by hyperpape 2y ago
It really never ceases to amaze me how many basic affordances terminals lack, that we hack around with bash configuration or helper tools.
Of course, I know it's a genuine hard area, and not one I've put any time into fixing, but it's also so high leverage--so many developers spend a ton of time in this environment.
- raron 2y agoKDE's Konsole has a feature to highlight "newly printed lines", but no timestamps. https://askubuntu.com/questions/1467849/what-is-the-bar-on-the-left-showing-in-konsole https://askubuntu.com/questions/1467849/what-is-the-bar-on-t...
- wruza 2y agoI find this bar annoying as hell, tbh, especially in interactive modes. Also Konsole messes up its ansi states all the time. It’s the only terminal in which I can hit <up>, sometimes see “~[[A;” or similar after my prompt, hit <enter> and it actually executes the previous command.
- Symbiote 2y agoSince it's KDE, there's naturally a setting to disable it.
- dv_dt 2y agoI would love a feature to scroll back to previous input lines, I don't think I ever found something that supports it (I haven't spent a lot of time searching for it admittedly)
- jandrese 2y agoAre you asking about something different than up-arrow or the 'history' command?
- dv_dt 2y agoYes, say you start a command that outputs a long buffer of lines, and you want to go back to the early part of that output, even better if you could jump back multiple scroll buffer points
- jandrese 2y agoThat is generally the responsibility of the terminal, not the shell. If your terminal doesn't have a scrollbar try hitting "scroll lock" and then moving up and down with page up/page down. Some really dumb terminals have no scrollback, but most modern ones do.
- dv_dt 2y agoI may be misunderstanding, I'm not talking about just the scrollback buffer (I don't think?), I want to not hunt for the line in the buffer and instead jump to the line of the last input command in the buffer. The "jumping between prompts" mentioned in the other comment is more or less that feature - but it seems for that implementation you need to customize the prompt with a special sequence and have an emulator that supports jumping to that seq. I wonder if something like tmux would do it w/o customization... oh maybe https://unix.stackexchange.com/questions/226731/jump-to-last-prompt-in-terminal-or-tmux https://unix.stackexchange.com/questions/226731/jump-to-last... hmm - seems like the more searchable term is "prompt jumping"
- c-st 2y agoIf I understood you right, some terminal emulators support this: https://codeberg.org/dnkl/foot#jumping-between-prompts https://codeberg.org/dnkl/foot#jumping-between-prompts
- atombender 2y agoiTerm on macOS does this. It calls them "marks", and you can set them anywhere, but by default it creates a mark for each prompt. You can then jump between them with cmd-arrow. iTerm also suppers showing the timestamp of each line, and it visualizes this in a nice way where lines emitted around the same time have their timestamps replaced with a vertical line.
- ku1ik 2y agoVSCode terminal also does this I believe.
- cobbaut 2y agoYou mean like tmux or screen? EDIT: apparently not, sorry.
- xp84 2y agoTry the Warp terminal app. That’s what I use and it does this. Its other main deal (to me) is that you can use the mouse and any other normal means to edit a command line. Really good for changing something on like line 1 of a 17-line curl command.
- wakawaka28 2y agoMaybe you want this: https://github.com/lambdaspace/ShellNotebook https://github.com/lambdaspace/ShellNotebook Or that prompt jumping thing. This isn't something I've looked for either but I guess I just got used to the way things are. If I'm running a command with long output I usually use a pager, and when I run something that takes a long time I usually save the output to a file. If it doesn't take long then you can run it again with a pager. Scrolling back is not super useful sometimes because output can change throughout a session. But it is useful enough to think about this problem, I suppose.
- saagarjha 2y agoI think iTerm does this
- soraminazuki 2y agoI get the exact opposite impression. The fact that you can simply press enter to mark the output is yet another sign of how malleable terminal interfaces are. You simply can't do that with GUI applications unless the developer created a button implementing that specific functionality.