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.
This commit is contained in:
Guido Cella 2020-11-27 10:48:57 +01:00 committed by Dudemanguy
parent a9aa5a1b1c
commit d479dfd67d
1 changed files with 5 additions and 3 deletions

View File

@ -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