Skip to content

Support the -- separator, e.g. git log -- dir/ #2111

Closed Answered by rsteube
mytskine asked this question in Q&A
Discussion options

You must be logged in to vote

Carapace has support for this with DashCompletion and DashAnyCompletion.

I went back and forth to support this implicitly but commands vary too much.
So at least for now it has to be configured explicitly and probably is just not added yet.

To continue the existing positional completion there is ActionPositional (ok, this one has no doc yet =D).

carapace.Gen(blameCmd).DashAnyCompletion(
	carapace.ActionPositional(blameCmd),
)

Not entirely happy with this though so it might change a bit in the future.

Git is quite complex so there are also a couple of opiniated choices that were made.
E.g. to separate files from ref arguments (which can be a lot) they are only completed when a path prefi…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rsteube
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request faq
2 participants
Converted from issue

This discussion was converted from issue #2108 on January 03, 2024 17:24.