From 6e0ceba5dbe326a171abdaaac6159fb60a8fd049 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 5 Mar 2024 19:36:55 -0500 Subject: [PATCH] Use $git_root_dir (to support WSL, worktrees, etc) for untracked files. --- functions/fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 74ea43a..8fa489d 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -1072,7 +1072,7 @@ function __bobthefish_prompt_git -S -a git_root_dir -a real_pwd -d 'Display the if [ "$theme_display_git_untracked" != 'no' ] set -l show_untracked (command git config --bool bash.showUntrackedFiles 2>/dev/null) if [ "$show_untracked" != 'false' ] - set new (command git ls-files --other --exclude-standard --directory --no-empty-directory (git rev-parse --show-toplevel) 2>/dev/null) + set new (command git ls-files --other --exclude-standard --directory --no-empty-directory "$git_root_dir" 2>/dev/null) if [ "$new" ] set new "$git_untracked_glyph" end