From 4247a54d98dd386056308d6d275a35a7ad77becb Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Wed, 4 Apr 2018 17:12:18 +0200 Subject: 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. --- DOCS/man/input.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'DOCS/man') 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 ""`` + 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. -- cgit v1.2.3