Limnoria-doc/use/plugins/conditional.rst
2011-06-28 08:11:32 +02:00

4.6 KiB

The Conditional plugin

gt <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.


nlt <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.


nne <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they are not equal.


ge <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.


cor <cond1> [<cond2> ... <condN>]

Returns true if any one of conditions supplied evaluates to true.


nle <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.


ceq <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if they are equal.


nge <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.


cxor <cond1> [<cond2> ... <condN>]

Returns true if only one of conditions supplied evaluates to true.


le <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.


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.


ne <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if they are not equal.


cand <cond1> [<cond2> ... <condN>]

Returns true if all conditions supplied evaluate to true.


nceq <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they are equal.


ngt <item1> <item2>

Does a numeric comparison on <item1> and <item2>. Returns true if they <item1> is greater than <item2>.


lt <item1> <item2>

Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.


match <item1> <item2>

Determines if <item1> is a substring of <item2>. Returns true if <item1> is contained in <item2>.