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

fix(nu): continuation prompt not being displayed correctly #5851

Merged
merged 1 commit into from Mar 21, 2024

Conversation

texastoland
Copy link
Contributor

@texastoland texastoland commented Mar 18, 2024

Description

Most minimal change possible. Other simplification are possible but not known to be backwards compatible. Also considered with-env or STARSHIP_SHELL=nu starship but they'd be worse. Happy to reformat indentation if desired.

Motivation and Context

Closes #5847:

The bug is starship prompt --continuation reads the STARSHIP_SHELL environment variable before it's set. The easiest fix would be to set $env.STARSHIP_SHELL = "nu"; immediately before load-env. Happy to PR.

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Tested locally by replacing my script and loading it both from my config as well as withnu --no-config.

Checklist:

  • I have updated the documentation accordingly. N/A
  • I have updated the tests accordingly. N/A

… `starship`

Most minimal changle possible. Other simplification are possible but not know to be
backwards compatible. Also considered `with-env` or `STARSHIP_SHELL=nu starship` but
they'd be worse. Happy to reformat indentation if desired.
@texastoland
Copy link
Contributor Author

@davidkna bugfix 🙏🏼

@davidkna
Copy link
Member

Please do not ping me unwarrantedly. This PR has only been open for two days.

@andytom andytom changed the title Fix #5847 by intializing $env.STARSHIP_SHELL before calling starship fix(nu): continuation prompt not being displayed correctly Mar 20, 2024
@davidkna davidkna merged commit d308e91 into starship:master Mar 21, 2024
17 checks passed
@davidkna
Copy link
Member

Thanks for the fix @texastoland, and thanks for reviewing @andytom!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PROMPT_MULTILINE_INDICATOR prompt has incorrect formatting in nushell
3 participants