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(init): improve starship path escaping #2848

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

davidkna
Copy link
Member

@davidkna davidkna commented Jul 3, 2021

Description

This PR replaces the quoting code for starship init with quoting via shell_words::quote. It also adds sprint_pwsh() in addition to sprint() to better account for string escaping in PowerShell.

Motivation and Context

@exactly-one-kas I think this might fix #2767, but I'm not sure what kind of path was failing for you. Can you please confirm whether this fixes your issue?
Edit: it seems to fix it

Closes #2767

Screenshots (if appropriate):

How Has This Been Tested?

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

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@davidkna davidkna requested a review from a team July 3, 2021 17:44
@andytom andytom merged commit a4a2adb into starship:master Jul 3, 2021
@davidkna davidkna deleted the escape-path branch March 26, 2022 12:50
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.

None yet

2 participants