diff options
author | wm4 <wm4@nowhere> | 2013-02-03 16:40:02 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-02-03 16:53:49 +0100 |
commit | 8b2c27f6c83187b0a941ffd09f08f54d50f405ba (patch) | |
tree | 74ef17a9c735f2756b9e4d46aabe3a9a16e66001 /DOCS/man/en/mpv.rst | |
parent | 0d3258fc1e0447de99263e62f59dfe11f1106765 (diff) | |
download | mpv-8b2c27f6c83187b0a941ffd09f08f54d50f405ba.tar.bz2 mpv-8b2c27f6c83187b0a941ffd09f08f54d50f405ba.tar.xz |
manpage: document option syntax variations better
Diffstat (limited to 'DOCS/man/en/mpv.rst')
-rw-r--r-- | DOCS/man/en/mpv.rst | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/DOCS/man/en/mpv.rst b/DOCS/man/en/mpv.rst index d8fa642546..60f8d0cabc 100644 --- a/DOCS/man/en/mpv.rst +++ b/DOCS/man/en/mpv.rst @@ -279,11 +279,34 @@ the *XXX* option or if *XXX* is compiled in. GUIs. | It has the following format: | %n%string\_of\_length\_n + | *EXAMPLES*: -| `mpv --ao pcm:file=%10%C:test.wav test.avi` +| `mpv --ao=pcm:file=%10%C:test.wav test.avi` | Or in a script: -| `mpv --ao pcm:file=%\`expr length "$NAME"\`%"$NAME" test.avi` +| `mpv --ao=pcm:file=%\`expr length "$NAME"\`%"$NAME" test.avi` + +Single dash versus double dash options +-------------------------------------- + +There are actually two option syntaxes: one which uses a single dash (``-opt``), +and one with double dashes (``--opt``). The double dash syntax always requires +a ``=`` to separate option name and value, while single dash options use a +space. + + +| Both of these examples pass the value `pcm:file=test.wav` to the `ao` option: +| `mpv -ao pcm:file=test.wav` +| `mpv --ao=pcm:file=test.wav` + +| This passes the empty string to `ao`, while `pcm:file=test.wav` is interpreted + as filename (common mistake): +| `mpv --ao pcm:file=test.wav` + +It's best to stick to one syntax to avoid usage errors. The double dash syntax +is preferred, and used throughout the manpage. +*NOTE*: the differences between these syntaxes might be removed in the future. +However, this has not happened yet. Per-file options ---------------- |