···5566(* Use to test for completion interactively. *)
7788-let tool ~file ~dir ~path =
88+let tool ~file ~dir ~path ~choice =
99 print_endline "Happy?";
1010 Cmdliner.Cmd.Exit.ok
1111···2323 and+ path =
2424 let doc = "Use me to test for path completion." in
2525 Arg.(value & opt (some path) None & info ["path"] ~doc)
2626+ and+ choice =
2727+ let doc = "Use me to test for enum completion for short and long options." in
2828+ Arg.(value & opt (enum ["one", `One; "two", `Two; "three", `Three]) `One
2929+ & info ["choice"; "c"] ~doc)
2630 in
2727- tool ~file ~dir ~path
3131+ tool ~file ~dir ~path ~choice
28322933let main () = Cmd.eval' cmd
3034let () = if !Sys.interactive then () else exit (main ())