Open copy opened 7 years ago
It seems to me that cmdliner could help generating the completion. Most of the information in these scripts is already present in the description of the command line built with cmdliner
In that case, this issue is blocked by https://github.com/dbuenzli/cmdliner/issues/1.
I wouldn't say blocked, I'd welcome manually written scripts to support it. Although I'm not excited by the maintenance burden.
Some news about this feature request: we are now using our own fork of cmdliner.
So if someone wants to work on this feature, it is acceptable to implement the feature in our fork. This should be easier than submitting it upstream given that it only needs to work for Dune rather than for everybody.
The links to the opam's complete script are invalid now.
I would also suggest a shell completion for dune exec
but I am not sure whether it's feasible.
e.g. I have an executable stanza hello
for hello.ml
. I expect
$ dune exec he
--(press TAB to complete)--> $ dune exec hello.exe
rather than
$ dune exec he
--(press TAB to complete)--> $ dune exec hello.ml
@arbipher We don't have any completion scripts in Dune at the moment, so when you do he -> hello,ml
that is just your terminal completing to whatever is in the current directory. We are working on completion in #6377 but I don't think we have anything for dune exec at the moment planned.
Shell completion, similar to opam's would be useful and remove the need to write Makefiles in order to remember jbuilder's commands and build targets. I.e., when you type
jbuilder build <tab>
, it should list all build targets andjbuilder <tab>
should list jbuilder's commands.For reference, opam's completion scripts are here: