Custom cmake targets completion #4322
Unanswered
MartyMcFlyInTheSky
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to write a custom
**
bash completion expansion that shows me all configured cmake targets to build. The way I intend it to work is this:cmake --build build --target **<ENTER>
should give me a list of cmake targets. I figure I'm quite close, so I intended to use the
_fzf_complete
setup helper as in the docs:Then bind it with
complete -F _fzf_complete_cmake -o default -o bashdefault cmake
But the problem is that the completion should only trigger when the
--targets
option is specified before. But the other flags /arguments are not important and the user might specify a variable amount of them before and after--target
. I'm not sure how filter that with the current helper API. I figure theprompt
argument would somehow have to get this information, but how? Any ideas?Beta Was this translation helpful? Give feedback.
All reactions