-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__fish_git_prompt_informative_status should obey showUntrackedFiles=false #4842
Comments
Thanks for filing, I'll be happy to merge a PR if you feel so inclined! |
Ideally, this would also use We've found that to be a bit faster, and it would also do the job of the |
@faho I like it! Ideally, one would use the same |
Does it? That would actually mean that
It's not. Only if you have executed the git completions beforehand.
Weeeeelllll... the problem is getting the data out of the function without calling it multiple times. Obviously calling We need the number of different kinds of files, and for that we'd either need to add an option to Or we'd need to actually duplicate the code. (This is one of those cases where an "upvar" mechanism - making it possible to define local variables in the outer function - would be useful. Or some other way to pass structured data) @snnw: For testing purposes - do you have a nice public repo where the build process or something creates loads of untracked files? |
Well, that explains why fish wouldn't complete Re code-sharing, I see. Complicate the code to share more vs code duplication... Looking at
would work, although it doesn't look great On the testing front, the directory I'm seeing this on is my hopelessly cluttered |
I just checked the
So we have to add
Yeah, that's also an idea. We'd have to be careful to only match the translated description at the end, and we'd have to be careful not to call the translation too much (that actually calls gettext, which can be slow).
Also not something you need to share 😄 - the idea is easily recreated. I just ran The news is Presumably changing from getting all untracked files to getting untracked files in the current directory and directories would change the numbers, but I don't think that's all that bad - it might even be more like you'd expect (e.g. if we didn't have the "pcre2" directory added, that would be ~200 files - which is not really useful information). I would even imagine the most useful part of knowing the number of untracked files is just knowing if there are any at all. |
Can confirm that Going back to the original issue, namely, Also, I wonder if |
That was what I meant by "use the current token". It's possible, just a bit fiddly. I think we have something similar elsewhere already.
I think the informative version prints the actual count, which would change. But as I said that probably doesn't really matter. |
I think this is fixed by 15cf45a? |
In a large git repository with many untracked files,
git ls-files --others
takes a long time to run.The non-informative prompt uses
__fish_git_prompt_showuntrackedfiles
andbash.showUntrackedFiles
to disable the untracked files part of the prompt, however, the informative prompt always tries to determine if there are untracked files.It would be great if this wasn't inconsistent. 😃
The text was updated successfully, but these errors were encountered: