Content-Length: 276757 | pFad | https://github.com/starship/starship/pull/6269

49 feat(status): add `{success,failure}_style` options by T0mstone · Pull Request #6269 · 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

feat(status): add {success,failure}_style options #6269

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

T0mstone
Copy link
Contributor

Description

Add two new config options for the style module that allow the user to style the status differently based on whether it was successful or not.

Motivation and Context

The color red usually indicates that something went wrong, so when using pipestatus = true or success_symbol, you wouldn't want a status of zero to show up in red.
By adding this feature, the module can style the status based on whether it was successful or not, allowing for easy discernment when looking at the prompt.

Screenshots (if appropriate):

Screenshot 2024-09-18_16h33

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.

I'm unsure which interactions to write unit tests for, since this feature interacts a lot with the previously existing stuff.

@davidkna davidkna merged commit e21775c into starship:master Dec 27, 2024
21 checks passed
@davidkna
Copy link
Member

Thanks for the contribution @T0mstone!

@T0mstone T0mstone deleted the pipestatus_style branch January 15, 2025 05:28
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 28, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [starship/starship](https://github.com/starship/starship) | minor | `v1.21.1` -> `v1.22.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>starship/starship (starship/starship)</summary>

### [`v1.22.1`](https://github.com/starship/starship/releases/tag/v1.22.1)

[Compare Source](starship/starship@v1.22.0...v1.22.1)

##### Bug Fixes

-   **windows:** downgrade libz-ng-sys ([#&#8203;6489](starship/starship#6489)) ([6f7c67b](starship/starship@6f7c67b))

### [`v1.22.0`](https://github.com/starship/starship/releases/tag/v1.22.0)

[Compare Source](starship/starship@v1.21.1...v1.22.0)

##### Features

-   **battery:** Use best match instead of first match for `battery.display` threshold ([#&#8203;6442](starship/starship#6442)) ([2690a32](starship/starship@2690a32))
-   **bun:** Detect bun using new text-format lockfile ([#&#8203;6441](starship/starship#6441)) ([2df521c](starship/starship@2df521c))
-   **direnv:** allow direnv to detect environment variables ([#&#8203;6196](starship/starship#6196)) ([4593716](starship/starship@4593716))
-   **status:** add `{success,failure}_style` options ([#&#8203;6269](starship/starship#6269)) ([e21775c](starship/starship@e21775c))

##### Bug Fixes

-   **fish:** restore support for fish \<v3.4.0 ([#&#8203;6337](starship/starship#6337)) ([85d3fb2](starship/starship@85d3fb2))
-   handle variable bash $SHLVL behavior with explicit option ([#&#8203;4912](starship/starship#4912)) ([7ead2b5](starship/starship@7ead2b5))
-   **hostname:** use DNS instead of NetBIOS name on Windows ([#&#8203;6343](starship/starship#6343)) ([43f097e](starship/starship@43f097e))
-   **init/pwsh:** preserve ViModeChangeHandler ([#&#8203;6225](starship/starship#6225)) ([9b6d394](starship/starship@9b6d394))
-   **init:** do not use cygpath for elvish ([#&#8203;6376](starship/starship#6376)) ([576aa14](starship/starship@576aa14))
-   **status:** add trailing space to `pipestatus_format` ([#&#8203;6404](starship/starship#6404)) ([8a38b8f](starship/starship@8a38b8f))
-   **username:** avoid using `whoami` on android ([#&#8203;6342](starship/starship#6342)) ([af5d139](starship/starship@af5d139)), closes [#&#8203;6340](starship/starship#6340)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMzcuMiIsInVwZGF0ZWRJblZlciI6IjM5LjEzNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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.

2 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/6269

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy