2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
.. _plugin-conditional:
|
|
|
|
|
|
|
|
The Conditional plugin
|
|
|
|
======================
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Numeric comparison
|
|
|
|
------------------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-nlt:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional nlt <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is less than *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-nne:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional nne <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if they are not equal.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-nle:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional nle <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is less than or equal to *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-nge:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional nge <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is greater than or equal to *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-nceq:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional nceq <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if they are equal.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-ngt:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional ngt <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a numeric comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if they *<item1>* is greater than *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
String comparison
|
|
|
|
-----------------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-le:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional le <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is less than or equal to *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-ceq:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional ceq <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if they are equal.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-gt:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional gt <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is greater than *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-ge:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional ge <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is greater than or equal to *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-ne:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional ne <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if they are not equal.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-lt:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional lt <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Does a string comparison on *<item1>* and *<item2>*.
|
|
|
|
Returns true if *<item1>* is less than *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-match:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional match <item1> <item2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Determines if *<item1>* is a substring of *<item2>*.
|
|
|
|
Returns true if *<item1>* is contained in *<item2>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Logical operators
|
|
|
|
-----------------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-cand:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional cand <cond1> [<cond2> ... <condN>]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns true if all conditions supplied evaluate to true.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-cxor:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional cxor <cond1> [<cond2> ... <condN>]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns true if only one of conditions supplied evaluates to true.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-cor:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional cor <cond1> [<cond2> ... <condN>]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns true if any one of conditions supplied evaluates to true.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-conditional-cif:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
conditional cif <condition> <ifcommand> <elsecommand>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Runs *<ifcommand>* if *<condition>* evaluates to true, runs *<elsecommand>*
|
|
|
|
if it evaluates to false.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Use other logical operators defined in this plugin and command nesting
|
|
|
|
to your advantage here.
|
2011-06-28 08:11:32 +02:00
|
|
|
|