1

Unsure what the best place to tackle this would be .bashrc? Using different shell? Some fancy terminal emulator?

Basically, I just want to keep seeing the command line / the last line of the terminal when I'm scrolling up in order to be able to more easily type while reading --help and stuff like that.

Comparable to: A sticky row in a spreadsheet editor, or the text field in most instant messaging apps, or the way an editor like nano keeps the list of keyboard shortcuts visible while you scroll the file, or the position: fixed property in css.

Possible solutions: A terminal emulator with a split view of the same bash session could work. Or a shell that handles scrolling in a way where it keeps the content of the last line the same.

sonofevil
  • 117

1 Answers1

1

You need both: 1) a special PS1= shell prompt and 2) a fancy terminal emulator.

Currently, I think the only terminal emulator that supports this on Linux is Visual Studio Code – enable terminal.integrated.stickyScroll.enabled in its settings. (It automatically injects the necessary prompt strings when you open a terminal window, so no manual .bashrc changes are needed.)

The underlying mechanism (the OSC 133 markers) actually comes from Final Term, but it's an abandoned project, and I'm not sure if it supported sticky scroll or if it only used the markers for a different purpose.

enter image description here

grawity
  • 501,077