I need add a mutually exclusive argument that is a string using Cmdliner lib.
Example
./program --suppress dir_a,dir_b
## or
./program --unsuppress dir_a,dir_b
The examples I found take a boolean indicating which argument was used, but beyond that I need the value.
open Cmdliner
let suppress_unsuppress =
Arg.(
value & vflag None
& [
( Some true,
info
~doc:
"Don't report on files whose path has a prefix in the list. \
Comma-separated-path-prefixes"
["suppress"] );
( Some false,
info ~doc:"Report on files whose path has a prefix in the list"
["unsuppress"] );
])
in