Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag special "mark" support #2112

Open
sagan opened this issue Feb 27, 2024 · 0 comments
Open

Flag special "mark" support #2112

sagan opened this issue Feb 27, 2024 · 0 comments

Comments

@sagan
Copy link

sagan commented Feb 27, 2024

For example, iptables flags support the "!" mark:

[!] -s, --source address[/mask][,...]
       Source specification. Address can be either a network name, a hostname, a network IP address (with /mask),
       or a plain IP address. ... A "!" argument before the address specification inverts the sense of the address.

e.g.:

! -s 192.168.1.0/24

The whole is interpreted as a flag, the "!" mark means negation of the condition.

Is it possible to add similar feature to cobra ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant