Skip to content
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

Support for git global options #237

Open
chitoku-k opened this issue Jul 13, 2023 · 2 comments
Open

Support for git global options #237

chitoku-k opened this issue Jul 13, 2023 · 2 comments
Labels
command:git Something about git enhancement New feature or request

Comments

@chitoku-k
Copy link
Owner

Command name

git

Completion context

git -C /path/to/cwd checkout **<TAB>
git -c foo=bar checkout **<TAB>
git --config-env=foo=BAR_VALUE checkout **<TAB>
git --exec-path=/path/to/git checkout **<TAB>
git --git-dir=/path/to/.git checkout **<TAB>
git --work-tree=/path/to/work-tree checkout **<TAB>
git --namespace=namespace **<TAB>
git --attr-source=tree-ish **<TAB>

What happens now?

Files are completed.

What do you expect to complete?

Proper completion is provided.

Currently, the second argument is always treated as a subcommand, which in this case always breaks completion. The best is to implement every global option but it should at least ignore them and correctly extract a subcommand.

@chitoku-k chitoku-k added enhancement New feature or request command:git Something about git labels Jul 13, 2023
@hexium310
Copy link
Collaborator

Can you commonize the treatment of global options in the completion of kubectl? This can easily implement completions accounting for global options.

@chitoku-k
Copy link
Owner Author

I've created #238. Does it suffice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:git Something about git enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants