-
Notifications
You must be signed in to change notification settings - Fork 626
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
completion: Simple rewrite attempt #541
Conversation
Cool, I was not able to get the I have one suggestion to improve blame completion to also match revisions:
|
About OSX: maybe I overestimated the portability of this approach. I also tried your patch but if I just type
Apparently this is used to match a revision in priority and only files if none matches, typically for Is it common to supply a revision to tig blame? Even if the completion to files and revs works, having the full list of revs (which can be pretty large in some repos) if the user only seeks files is not really helpful. But maybe I just don't know about the use cases of Also, the whole |
It re-uses utilities from the classic git completion script (with `_completion_loader`)
So that we can avoid depending on git's completion installation. The original completion functions are renamed from `__gitxxx` to `__tigxxx`, with some exceptions.
I put all the mainline completion utilities we depend on directly in the file to avoid being too dependent on the environment and/or git's completion version (just like it was before). In theory, the inlining could be semi-automatized (with some effort...) to ease the maintenance but we probably don't need to update the completion too often. The issue you raised about the blame completion still need to be resolved. Personally, I'd still be in favor of using the mainline approach which favors the most common command usage. |
Thanks, I will install it and test it out next week |
News on this? FWIW, I have been using it almost daily since then. Noteworthy examples:
|
Work towards #540.
I made a small completion script which re-uses the base git's. It is supposed to have better support for revisions and options completions.
The drawback is that the base git's completion must be installed beforehand. For most bash users, this should be a given. For zsh, it would probably won't work in this state but tig's completion is already builtin in zsh (see git's completion in zsh's tree). It only matches
git log
behaviour though...It should also be checked for compatibility with old git versions. Does tig have a minimum git version requirement?
A standalone version should not be too hard to write with heavy copy-pasting if needed.
Either way, this first draft can be used to validate its correct behaviour. I tried some common combinations but additional testing would be nice.