From 8e66b855a3539654e48dd0b3ca7bad234427f2ca Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 4 Nov 2018 12:12:38 +0100 Subject: [PATCH] doc/protocol.rst: mention that sub-expressios must be enclosed in parantheses Closes #399 --- doc/protocol.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/protocol.rst b/doc/protocol.rst index 91208c8d5..5198ca3fa 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -175,10 +175,14 @@ of: matches the audio format with the given mask (i.e. one or more attributes may be "*"). -- ``(!EXPRESSION)``: negate an expression. +- ``(!EXPRESSION)``: negate an expression. Note that each expression + must be enclosed in parantheses, e.g. :code:`(!(artist == 'VALUE'))` + (which is equivalent to :code:`(artist != 'VALUE')`) - ``(EXPRESSION1 AND EXPRESSION2 ...)``: combine two or - more expressions with logical "and". + more expressions with logical "and". Note that each expression must + be enclosed in parantheses, e.g. :code:`((artist == 'FOO') AND + (album == 'BAR'))` Prior to MPD 0.21, the syntax looked like this::