diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index 2a44765c2..f0bc022a8 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -325,8 +325,7 @@ function __fish_git_prompt --description "Prompt function for Git" if test -n "$__fish_git_prompt_showuntrackedfiles" if test (git config --bool bash.showUntrackedFiles) != false - set -l files (git ls-files --others --exclude-standard) - if test -n "$files" + if git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null ^/dev/null set u $___fish_git_prompt_char_untrackedfiles end end