summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-21 09:22:25 +0200
committerwm4 <wm4@nowhere>2013-02-09 00:21:17 +0100
commit267a889cc2c5ca688a2b8fc93cf8e5349a3c8a44 (patch)
treeee2561f256db05092e61fa797be4b7ecaf3db991 /DOCS
parent5412993724aee1126bfc8dfbc0422ebe5251b9b6 (diff)
downloadmpv-267a889cc2c5ca688a2b8fc93cf8e5349a3c8a44.tar.bz2
mpv-267a889cc2c5ca688a2b8fc93cf8e5349a3c8a44.tar.xz
options: unify single dash and double dash options
There were two option syntax variations: "old": -opt value "new": --opt=value "-opt=value" was invalid, and "--opt value" meant "--opt=" followed by a separate option "value" (i.e. interpreted as filename). There isn't really any reason to do this. The "old" syntax used to be ambiguous (you had to call the option parser to know whether the following argument is an option value or a new option), but that has been removed. Further, using "=" in the option string is always unambiguous. Since the distinction between the two option variants is confusing, just remove the difference and allow "--opt value" and "-opt=value". To make this easier, do some other cleanups as well (e.g. avoid having to do a manual lookup of the option just to check for M_OPT_PRE_PARSE, which somehow ended up with finally getting rid of the m_config.mode member). Error reporting is still a mess, and we opt for reporting too many rather than too few errors to the user. There shouldn't be many user-visible changes. The --framedrop and --term-osd options now always require parameters. The --mute option is intentionally made ambiguous: it works like a flag option, but a value can be passed to it explicitly ("--mute=auto"). If the interpretation of the option is ambiguous (like "--mute auto"), the second string is interpreted as separate option or filename. (Normal flag options are actually ambiguous in this way too.)
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/mpv.rst23
1 files changed, 0 insertions, 23 deletions
diff --git a/DOCS/man/en/mpv.rst b/DOCS/man/en/mpv.rst
index 60f8d0cabc..5f6a659e69 100644
--- a/DOCS/man/en/mpv.rst
+++ b/DOCS/man/en/mpv.rst
@@ -285,29 +285,6 @@ the *XXX* option or if *XXX* is compiled in.
| Or in a script:
| `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
----------------