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

Connected prompt support #347

Open
jmoore34 opened this issue Mar 14, 2022 · 4 comments
Open

Connected prompt support #347

jmoore34 opened this issue Mar 14, 2022 · 4 comments
Labels
A-Prompt Area: Prompt features and styling enhancement New feature or request

Comments

@jmoore34
Copy link
Contributor

A nice feature that zsh's powerlevel10k supports is connecting the left and right prompt with a solid or dotted line:
image

In action:
image

In addition it might be nice to be able to tweak the color of the connector.

@sholderbach
Copy link
Member

Do you want to use it with nushell or in a separate project?
For solutions in pure nu @fdncred is probably the prompt maestro, getting the different prompt plugins like starship or oh-my-posh to work. He probably knows if reedline needs to provide additional features to make that smooth.

@sholderbach sholderbach added enhancement New feature or request A-Prompt Area: Prompt features and styling labels Mar 14, 2022
@jmoore34
Copy link
Contributor Author

I was thinking in nushell; perhaps the ansi command could be used to figure out the terminal width or such

@sholderbach
Copy link
Member

I don't know if the PROMPT_COMMAND currently supports dynamic resizing. (i.e. execute nu code once or frequently/whenever necessary) Reedline is using crossterm to listen via terminal raw mode for those resize events. Getting info back from the terminal via control sequences, is not particularly fast.

@fdncred
Copy link
Collaborator

fdncred commented Mar 14, 2022

we have tools already that understand the terminal's width, otherwise we wouldn't be able to hid the right prompt when the text from the left prompt invades its space. if the left prompt had text and a newline and the right prompt had text and a new line we might be able to draw a line between the top left prompt and top right prompt. it would need to be experimented with to figure out if it would work. one could start looking at the oh-my.nu script in nu_scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Prompt Area: Prompt features and styling enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants