Merged
Conversation
The original robbyrussell theme in oh-my-zsh shows a yellow ✗ when the git repository has uncommitted changes. The current oh-my-posh version shows ✗ only when the last command fails (exit code), which differs from the original behavior. This fix: - Adds fetch_status: true to detect git changes - Shows ✗ when Working or Staging has changes - Removes the status segment (exit code) that wasn't part of original
Some Nightscout API providers (e.g. T1Pal) return the date field as a float (e.g. 1770512410938.386). Go's json.Unmarshal cannot decode a float into an int64 field, causing the segment to silently fail. Add a custom UnmarshalJSON that accepts both integer and floating-point JSON numbers, truncating to int64. This preserves the existing Date int64 type and is fully backward compatible. Fixes #7284
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the robbyrussell Oh My Posh theme to surface Git working tree status directly in the Git segment, aligning the prompt output more closely with the classic “git:(branch) ✗” behavior.
Changes:
- Enable
fetch_statusfor the Git segment so.Working/.Stagingstatus fields are available in the template. - Extend the Git template to show working changes and display a ✗ indicator when working or staging changes exist.
- Remove the separate
statussegment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites