Add marks for clearing and other semantic functionality #3469
Replies: 5 comments 4 replies
-
|
Sweet, I'll move my post here. Gauging interest in bringing the macOS Terminal's "Clear to Previous Mark" feature to Ghostty. If you're not familiar, it clears just the last command: cmdL.movUse Cases
PrecedentThis feature is implemented by Terminal and iTerm2. Misc |
Beta Was this translation helpful? Give feedback.
-
|
I definitely want this too. I use that all the time to correct for mistakes and leave only the good history, or to try something to see if it's helpful. |
Beta Was this translation helpful? Give feedback.
-
|
@edwardloveall would it be ok to change this FR to be about marks in general? I was about to create a new discussion on the topic but it seems to me that there's plenty of context here already. In addition to enabling clearing the output of the previous prompt, marks would also enable a more general solution to selecting the output of previous command (see #4385) like @indirect pointed out. They would also potentially enable stuff like clearing the screen while preserving scrollback (see #5269). |
Beta Was this translation helpful? Give feedback.
-
|
I would say this is the one feature that makes me stick to Terminal.app. Is there maybe a workaround to emulate this in Ghostty? |
Beta Was this translation helpful? Give feedback.
-
|
Since it's related, I'm posting my few cents here from #9706. The integrated terminal of vscode also support some nice semantic features. For full ref see: https://code.visualstudio.com/docs/terminal/shell-integration Briefly, vscode's terminal also group terminal text by commands (similar to the
The decorators (blue/red dots on the left) allows one to copy the exit code, copy the command output and even rerun the command by clicking the dot. The scrollbar will highlight the status of the command (blue/red markups on the right), which is also helpful for navigating between commands. Furthermore, vscode has a 'sticky scroll' feature, which pins the command input to the top of the panel. This is a not-important-but-nice-to-have feature to me. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One thing I miss from Apple's Terminal.app is the ability to clear to the previous prompt. They enable with with the concept of marks. I use this all the time when I've just printed a mistake to the screen and want to remove just that. A mistyped command, a large amount of output that I go on to refine, etc. It could also be used to copy the output of the last command, jump backwards and forwards by command (instead of some number of lines), and create arbitrary points in a large printed log.
Related
Beta Was this translation helpful? Give feedback.
All reactions