-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Hi all, thanks for your work on fish-shell. I'm using fish (version 3.0.2) on MacOS (10.14.6) in an Iterm2 (build 3.3.2) terminal. Using fish_config I have selected the "Informative Vcs" prompt.
I am not sure if this is considered a bug, but at least I'm wondering why the fish git prompt does not always show that untracked files are present. To be precise: the "untrackedfiles" character (…) only appears in the prompt when untracked files are present in or below the current directory. When untracked files are present above the current directory (off course still within the same git repo) the git prompt seems to ignore them.
This behavior seems to be caused by the __fish_git_prompt_informative_status command. By contrast, the __fish_git_prompt_untracked command always returns the expected value.
To illustrate what I mean, I made this screenshot reproducing the issue:

As you can see, file.txt is untracked, but once you descend into the "sub" directory, the prompt shows the "cleanstate" check mark even though __fish_git_prompt_untracked recognizes the presence of an untracked file.
I also tested this without third-party customizations (sh -c 'env HOME=$(mktemp -d) fish'), with the "Informative Vcs" prompt as only customization. The same behavior occurred.