Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separators between command output #5953

Open
gregorni opened this issue May 1, 2024 · 0 comments
Open

Separators between command output #5953

gregorni opened this issue May 1, 2024 · 0 comments
Labels
✨ enhancement A new feature implementation.

Comments

@gregorni
Copy link

gregorni commented May 1, 2024

Feature Request

Is your feature request related to a problem? Please describe.

I often run many commands which produce a long terminal output (for instance, cargo build or pre-commit run). When that happens, and I want to scroll up to find the output of a previous command, I find it hard to tell where the command of one output starts and the output of the next begins. The additional newline before the prompt helps the problem somewhat, but it's not pronounced enough to be clearly visible as I'm scrolling by.

Describe the solution you'd like

I was thinking, Starship could provide an option for (or just enable) a separator between commands. For instance, it could look something like this:

~/test 
⬢ [fedora-toolbox:39] ❯ ls -la
total 0
drwxr-xr-x. 1 gregorni gregorni   0 May  1 18:17 ./
drwx------. 1 gregorni gregorni 654 May  1 18:17 ../


                               --------------------------

~/test 
⬢ [fedora-toolbox:39] ❯ echo "hi"
hi


                               --------------------------

~/test 
⬢ [fedora-toolbox:39] ❯ 

The separator should always be centered in relation to the terminal window.

It could also be colored to be more visible, maybe the color could even reflect the command's status (red if the command errored, otherwise green). Maybe the separator character could also be configurable (for instance, = would also make sense)

Describe alternatives you've considered

One option I've considered is to customize the default prompt to display such a separator. However, this would mean the separator is shown when the terminal is first opened and no command has been run yet. While this technically does the trick, it's a bit ugly.

Centering the separator would also be hard, as I wouldn't have access to the real-time terminal width.


While I must admit that this is a bit of a stupid and extremely niche thing to suggest, it would improve the experience of looking through previous commands' output a lot.

@gregorni gregorni added the ✨ enhancement A new feature implementation. label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement A new feature implementation.
Projects
None yet
Development

No branches or pull requests

1 participant