From c40b2e1905e5e3ba2b54196c94275063680b151a Mon Sep 17 00:00:00 2001 From: Edward DeVries Date: Thu, 4 Dec 2025 23:06:48 -0500 Subject: [PATCH] panache-git prompt: fix bugs showing modified files and non-home directories 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. Nushell v0.109 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-toc panache-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. Removing an excess `str join` fixed the issue. --- modules/prompt/panache-git.nu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/prompt/panache-git.nu b/modules/prompt/panache-git.nu index 45ea64a31..96e929bef 100644 --- a/modules/prompt/panache-git.nu +++ b/modules/prompt/panache-git.nu @@ -29,7 +29,7 @@ export def current-dir [] { let current_dir = ($env.PWD) let current_dir_relative_to_home = ( - do --ignore-errors { $current_dir | path relative-to $nu.home-path | str join } + do --ignore-errors { $current_dir | path relative-to $nu.home-path } ) let in_sub_dir_of_home = ($current_dir_relative_to_home | is-not-empty) @@ -159,8 +159,8 @@ export def repo-structured [] { let staging_worktree_table = (if $has_staging_or_worktree_changes { $status | where ($it | str starts-with '1') or ($it | str starts-with '2') - | split column ' ' - | get column2 + | split column ' ' col1 sw + | get sw | split column '' staging worktree --collapse-empty } else { [[]]