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

Newline for right prompt? #5856

Closed
roguh opened this issue Mar 21, 2024 · 5 comments
Closed

Newline for right prompt? #5856

roguh opened this issue Mar 21, 2024 · 5 comments
Labels
✨ enhancement A new feature implementation.

Comments

@roguh
Copy link

roguh commented Mar 21, 2024

Feature Request

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

This would be a nice extra feature to give me more room when typing. It also makes it easier to copy-paste terminal output while excluding the extra information from my right_format.

Describe the solution you'd like

Perhaps a right_line_break module analogous to the line_break module used in the typical left prompt.

Describe alternatives you've considered

I tried searching for related issues and mentions to the newline in the docs, but could not find any.

Thank you! Big fan of starship

@roguh roguh added the ✨ enhancement A new feature implementation. label Mar 21, 2024
@DerRockWolf
Copy link

What do you want the result to look like?
You can align modules to the right above the line where you can type, using the fill module.

@roguh
Copy link
Author

roguh commented May 13, 2024

The $fill module fits my needs, thank you.

Here's the output I had:

May 13 13:39-06:00
confs $ (cursor here) .....................................main   9b78  gke-dev-cluster

The output now:

May 13 13:39-06:00 confs $ .....................................main   9b78  gke-dev-cluster
(cursor here)

I moved my right prompt modules to the main prompt and used fill.

Ideally, I'd want the right prompt to be on the same line as the date, like this:

May 13 13:39-06:00 .....................................main   9b78  gke-dev-cluster
confs $ (cursor here)

Either of these fits my needs since they give me a way to copy-paste just the command and output without my prompt.

@roguh
Copy link
Author

roguh commented May 13, 2024

Nevermind, I figured out exactly my desired output with a mix of $fill and $line_break, no more right_prompt either (which means no more BASH-incompatibility).

Here's what I used to get this:

May 13 13:48-06:00                                              main   9b78  gke-dev-cluster
confs $ (cursor here)
format = "$time$shell${custom.machine_architecture}$hostname$username$jobs$all$git_status$fill$battery$status$cmd_duration$git_branch${custom.git_metrics_main_added_deleted}$git_commit$conda$kubernetes$line_break$directory$character"
right_format = ""
add_newline = false

[line_break]
# Prompt is one line, not two lines
disabled = false

roguh added a commit to FeLiNa0/confs that referenced this issue May 13, 2024
@DerRockWolf
Copy link

Great that you were able to solve it. 🙂

Please close the issue once you're happy.

@roguh roguh closed this as completed May 13, 2024
@roguh
Copy link
Author

roguh commented May 13, 2024

Thank you! I didn't realize these modules existed.

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

2 participants