Ability to ignore untracked files in git status
Closed this issue · 6 comments
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 ?
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 togit 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}
Now that's fast :)
Docs for git status -u state it must be
-uno
, not-u no
. The latter interpretsno
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 interpretsno
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.