Tag Archives: Boolean

7.1.1. Matching booleans

In order to match a boolean, no value is needed and all values are ignored.

Boolean matching is used by default for all fetch methods of type “boolean”.

When boolean matching is used, the fetched value is returned as-is, which means that a boolean “true” will always match and a boolean “false” will never match.

Boolean matching may also be enforced using “-m bool” on fetch methods which return an integer value. Then, integer value 0 is converted to the boolean “false” and all other values are converted to “true”.

Share Button