summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorNicolas F <ovdev@fratti.ch>2018-04-04 17:12:18 +0200
committerwm4 <1387750+wm4@users.noreply.github.com>2019-09-22 15:04:58 +0200
commit4247a54d98dd386056308d6d275a35a7ad77becb (patch)
tree51c1303b98952f2bf9aa99fcca8d1bc1e934c811 /DOCS/man
parent4cda63bd14c2087eb372fbb282fb47aea77a7923 (diff)
downloadmpv-4247a54d98dd386056308d6d275a35a7ad77becb.tar.bz2
mpv-4247a54d98dd386056308d6d275a35a7ad77becb.tar.xz
command: add expand-path to expand mpv paths
The question came up on how a client would figure out where screenshot-directory saved its screenshots if it contained mpv-specific expansions. This command should remedy the situation by providing a way for the client to ask mpv to do an expansion.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/input.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 4aba60cd8b..a2d5f517c5 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -529,6 +529,18 @@ Remember to quote string arguments in input.conf (see `Flat command syntax`_).
used only through the client API or from a script using
``mp.command_native``. (see `Property Expansion`_).
+``expand-path "<string>"``
+ Expand a path's double-tilde placeholders into a platform-specific path.
+ As ``expand-text``, this can only be used through the client API or from
+ a script using ``mp.command_native``.
+
+ .. admonition:: Example
+
+ ``mp.osd_message(mp.command_native({"expand-path", "~~home/"}))``
+
+ This line of Lua would show the location of the user's mpv
+ configuration directory on the OSD.
+
``show-progress``
Show the progress bar, the elapsed time and the total duration of the file
on the OSD.