deno-cliffy
deno-cliffy copied to clipboard
Add a way to make options conflicting with arguments
As discussed in #225, it could be nice to make it possible to create conflicting depending on passed arguments
One use case could be when you want the default argument be a file, but alternative sources could be passed as option
mycli read-stuff my_file_with_content.json
mycli read-stuff --from-port 443
.command("read-stuff [file]")
.option("--form-port <port>", {conflicts:"[file]"})
Currently thinking about this. Maybe it's better to add a .argument(name, options)
method so you can define conflicting options on the argument instead of defining conflicting arguments on the option.