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: Remove trailing whitespace from Terraform version #2726

Merged
merged 1 commit into from
May 16, 2021

Conversation

christippett
Copy link
Contributor

Terraform's $version includes a single trailing whitespace that restricts the formatting options available to the user.

Description

This PR removes the trailing whitespace that's appended to Terraform's version.

Motivation and Context

I've styled Starship's modules as 'pills' with a background colour that's different from the terminal. In its current form it's not possible to have Terraform's version flush with the edge.

Screenshot - Code - 2021-05-15 16 04 13

Example configuration (Nerd Font won't render on GitHub, but you get the idea).

[terraform]
format = "[](black)[$symbol$version]($style)[](black) "
version_format = "$raw"

style = "purple bg:black"
symbol = "ﯟ "

If the space is desired, it can be added explicitly by the user. This is consistent with how other module's versions are formatted.

format = "[$symbol$version $workspace]($style) "

Screenshots (if appropriate):

See above.

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.

Copy link
Member

@vladimyr vladimyr left a comment

Choose a reason for hiding this comment

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

LGTM

@christippett Thanks for making it consistent with other modules. 👍

@matchai matchai merged commit ae6c69b into starship:master May 16, 2021
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.

3 participants