Content-Length: 303209 | pFad | https://github.com/starship/starship/pull/772

CA fix: Parse arguments of $VISUAL and $EDITOR by dominikbraun · Pull Request #772 · starship/starship · GitHub
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: Parse arguments of $VISUAL and $EDITOR #772

Merged
merged 3 commits into from
Dec 23, 2019
Merged

fix: Parse arguments of $VISUAL and $EDITOR #772

merged 3 commits into from
Dec 23, 2019

Conversation

dominikbraun
Copy link
Contributor

Description

We thought that Issue #769 was a result of empty $VISUAL and/or $EDITOR variables, which were indeed a problem. However, the same error occurs when an environment variable contains arguments or options. This will cause starship configure to panic:

export VISUAL="vi -m"

While #770 fixes the bug for empty environment variables, this PR takes all options like -m into account when executing the editor.

Motivation and Context

Closes #769

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

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.

@Scotsguy
Copy link
Contributor

How far down the rabbit hole can we go?

@dominikbraun
Copy link
Contributor Author

Do you mind that I rebased from your branch? To be honest, I don't know another way to build upon an unmerged PR.

@Scotsguy
Copy link
Contributor

Whatever you did, it seems to have worked

Copy link
Member

@matchai matchai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Thank you for the help @dominikbraun and @Scotsguy! 🙏😊

@matchai matchai merged commit 56d62bd into starship:master Dec 23, 2019
@matchai
Copy link
Member

matchai commented Dec 23, 2019

@all-contributors Please add @dominikbraun for code. 🎉

@allcontributors
Copy link
Contributor

@matchai

I've put up a pull request to add @dominikbraun! 🎉

@jRimbault jRimbault mentioned this pull request Aug 20, 2020
5 tasks
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.

Panic in starship configure on macOS
3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/starship/starship/pull/772

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy