chrisant996/clink-flex-prompt

Ability to ignore untracked files in git status

Closed this issue · 6 comments

eblis commented

I usually always have some untracked files in my git repos which make the git part of the prompt never report purple (green?) status, where everything is ok and up to date.
Could we have a setting to tell it to ignore untracked files in the report, and only concentrate on files that have been added to the repository ?

eblis commented

I modified the function flexprompt.get_git_status() function and added the -u no arguments to git status, which made it stop reporting on untracked files.

I modified the function flexprompt.get_git_status() function and added the -u no arguments to git status, which made it stop reporting on untracked files.

Docs for git status -u state it must be -uno, not -u no. The latter interprets no as the file pattern for which to check status.

I added a nountracked (or nu for short) arg to omit untracked files.

E.g. {git:nu}

eblis commented

Now that's fast :)

eblis commented

Docs for git status -u state it must be -uno, not -u no. The latter interprets no as the file pattern for which to check status.

Thanks for the info.
After commenting I modified the flag to the full name (--untracked-files=no) so if I ever look at the file again I can remember what the hell that flag does :)

Docs for git status -u state it must be -uno, not -u no. The latter interprets no as the file pattern for which to check status.

Thanks for the info.
After commenting I modified the flag to the full name (--untracked-files=no) so if I ever look at the file again I can remember what the hell that flag does :)

Cool. In the change I made, it should be very clear what the flag does, because it's configurable, so I will continue to use the short flag.