Home > other >  What is the "sense" of a command line option?
What is the "sense" of a command line option?

Time:07-13

I am reading the documentation for glib's CLI option parser and I'm very confused about one of their option flags.

G_OPTION_FLAG_REVERSE
For options of the G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.

What does this mean? What is the "sense" of an option"?

CodePudding user response:

If an option does not take an argument, it can be considered boolean. The option is usually considered 'true' if present, or 'false' if absent. Those interpretations can be reversed, and that changes the sense of the option.

  • Related