summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2020-11-27 10:48:57 +0100
committerDudemanguy <random342@airmail.cc>2020-12-06 17:31:28 +0000
commitd479dfd67de910d2a8abf876cd2d99cc2e62c2ea (patch)
tree0787b022dbea3c0894514d5e6f80b318ace9b56b /DOCS/man
parenta9aa5a1b1cf3573a219dec2b98aea06d3b866908 (diff)
downloadmpv-d479dfd67de910d2a8abf876cd2d99cc2e62c2ea.tar.bz2
mpv-d479dfd67de910d2a8abf876cd2d99cc2e62c2ea.tar.xz
manpage: clarify profile-cond requires underscores
While this says that _ is replaced with -, it doesn't say that you HAVE to use _. This isn't obvious and I didn't understand why my profile conditions with - weren't working at first. Seeing as the person who reproted #8324 ran into this as well, this may be worth clarifying.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/mpv.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst
index be29a977d5..d00c8a77f4 100644
--- a/DOCS/man/mpv.rst
+++ b/DOCS/man/mpv.rst
@@ -781,9 +781,11 @@ ignored. This Lua code execution is not sandboxed.
Any variables in condition expressions can reference properties. If an
identifier is not already defined by Lua or mpv, it is interpreted as property.
-For example, ``pause`` would return the current pause status. If the variable
-name contains any ``_`` characters, they are turned into ``-``. For example,
-``playback_time`` would return the property ``playback-time``.
+For example, ``pause`` would return the current pause status. You cannot
+reference properties with ``-`` this way since that would denote a subtraction,
+but if the variable name contains any ``_`` characters, they are turned into
+``-``. For example, ``playback_time`` would return the property
+``playback-time``.
A more robust way to access properties is using ``p.property_name`` or
``get("property-name", default_value)``. The automatic variable to property