panache-git: fix bugs showing modified files and non-home dirs #1188
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.
This PR fixes two bugs in the panache-git prompt:
First, modified file counts were not being properly shown after updating to Nushell v0.109, which contained a breaking change in
split column: https://www.nushell.sh/blog/2025-11-29-nushell_v0_109_0.html#switch-split-column-to-0-index-like-other-commands-tocpanache-git relied on the old default column names when splitting columns to count modified files. This has been fixed with explicit column names so that the default names no longer matter.
Second, when the current working directory was outside the home directory, panache-git would throw an error.
The code was attempting to join path strings that didn't exist, and the
str joinin question turned out to be unnecessary, so it was removed, avoiding the error.