-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Perhaps I'm missing something, but I can't find a way to create mutually exclusive option groups in Click. For example, I have a command that can take input from either a socket or a file, and I'd like the following syntax:
cmd [-file <filename> | -stream <address>] ...
At most one (or, in other examples, exactly one) of the options may be specified. Specifying more than one is a parse error caught by the library.
Is it possible to implement this in click at present? If not, would it be feasible to add it? I've not quite got my head around the general architecture yet. Would this feature be a reasonable fit, or does it go against the overall design in some way I've missed?
jwodder, PeterParker, eigenein, Congee, espdev and 4 more
Metadata
Metadata
Assignees
Labels
No labels