Plugin list

Conditional

This plugin provides logic operators and other commands that enable you to run commands only if a condition is true. Useful for nested commands and scripting.

Command Help
candConditional cand <cond1> [<cond2> ... <condN>]
Returns true if all conditions supplied evaluate to true.
ceqConditional ceq <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if they are equal.
cerrorConditional cerror <testcommand>
Runs <testcommand> and returns true if it raises an error; false otherwise.
cifConditional cif <condition> <ifcommand> <elsecommand>
Runs <ifcommand> if <condition> evaluates to true, runs <elsecommand> if it evaluates to false. Use other logical operators defined in this plugin and command nesting to your advantage here.
corConditional cor <cond1> [<cond2> ... <condN>]
Returns true if any one of conditions supplied evaluates to true.
cxorConditional cxor <cond1> [<cond2> ... <condN>]
Returns true if only one of conditions supplied evaluates to true.
geConditional ge <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.
gtConditional gt <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.
leConditional le <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.
ltConditional lt <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.
matchConditional match [--case-insensitive] <item1> <item2>
Determines if <item1> is a substring of <item2>. Returns true if <item1> is contained in <item2>. Will only match case if --case-insensitive is not given.
nceqConditional nceq <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if they are equal.
neConditional ne <item1> <item2>
Does a string comparison on <item1> and <item2>. Returns true if they are not equal.
ngeConditional nge <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.
ngtConditional ngt <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.
nleConditional nle <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.
nltConditional nlt <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.
nneConditional nne <item1> <item2>
Does a numeric comparison on <item1> and <item2>. Returns true if they are not equal.