History

options: add --script-opt alias for --script-opts-append

Kacper Michajłow committed 2 years ago

Commit 153d4921 parent 4045fac4 files · +10 −5Browse files

Unified · Split

4 files
  1. DOCS/interface-changes/script-opt.txt +1 −0
  2. DOCS/man/options.rst +5 −2
  3. DOCS/man/stats.rst +3 −3
  4. options/options.c +1 −0
DOCS/interface-changes/script-opt.txt+1−0
@@ -0,0 +1 @@
1add `--script-opt` alias for `--script-opts-append`
DOCS/man/options.rst+5−2
@@ -828,12 +828,15 @@ Program Behavior · 827 unmodified lines
828 828
829 ``--scripts`` is a path list option. See `List Options`_ for details.829 ``--scripts`` is a path list option. See `List Options`_ for details.
830 830
831``--script-opts=key1=value1,key2=value2,...``831``--script-opt=<key=value>``, ``--script-opts=key1=value1,key2=value2,...``
832 Set options for scripts. A script can query an option by key. If an832 Set options for scripts. A script can query an option by key. If an
833 option is used and what semantics the option value has depends entirely on833 option is used and what semantics the option value has depends entirely on
834 the loaded scripts. Values not claimed by any scripts are ignored.834 the loaded scripts. Values not claimed by any scripts are ignored.
835 835
836 This is a key/value list option. See `List Options`_ for details.836 Each use of the ``--script-opt`` option will add another option to the
837 internal list, while ``--script-opts`` takes a list of options at once,
838 and overwrites the internal list with it. The latter is a key/value list
839 option. See `List Options`_ for details.
837 840
838``--merge-files``841``--merge-files``
839 Pretend that all files passed to mpv are concatenated into a single, big842 Pretend that all files passed to mpv are concatenated into a single, big
DOCS/man/stats.rst+3−3
@@ -251,11 +251,11 @@ The keys are grouped automatically using a simple analysis of the command · 250 unmodified lines
251string, and one should not expect documentation-level grouping accuracy,251string, and one should not expect documentation-level grouping accuracy,
252however, it should still be reasonably useful.252however, it should still be reasonably useful.
253 253
254Using ``--idle --script-opts-append=stats-bindlist=yes`` will print the list to254Using ``--idle --script-opt=stats-bindlist=yes`` will print the list to
255the terminal and quit immediately. Long lines are clipped to the terminal width255the terminal and quit immediately. Long lines are clipped to the terminal width
256unless this is disabled with ``--script-opts-append=stats-term_clip=no``. Escape256unless this is disabled with ``--script-opt=stats-term_clip=no``. Escape
257sequences can be disabled by adding ``-`` before ``yes``, i.e.257sequences can be disabled by adding ``-`` before ``yes``, i.e.
258``--script-opts-append=stats-bindlist=-yes``.258``--script-opt=stats-bindlist=-yes``.
259 259
260Like with ``--input-test``, the list includes bindings from ``input.conf`` and260Like with ``--input-test``, the list includes bindings from ``input.conf`` and
261from user scripts. Use ``--no-config`` to list only built-in bindings.261from user scripts. Use ``--no-config`` to list only built-in bindings.
options/options.c+1−0
@@ -557,6 +557,7 @@ static const m_option_t mp_opts[] = { · 556 unmodified lines
557 {"scripts", OPT_PATHLIST(script_files), .flags = M_OPT_FILE},557 {"scripts", OPT_PATHLIST(script_files), .flags = M_OPT_FILE},
558 {"script", OPT_CLI_ALIAS("scripts-append")},558 {"script", OPT_CLI_ALIAS("scripts-append")},
559 {"script-opts", OPT_KEYVALUELIST(script_opts)},559 {"script-opts", OPT_KEYVALUELIST(script_opts)},
560 {"script-opt", OPT_CLI_ALIAS("script-opts-append")},
560 {"load-scripts", OPT_BOOL(auto_load_scripts)},561 {"load-scripts", OPT_BOOL(auto_load_scripts)},
561#endif562#endif
562#if HAVE_JAVASCRIPT563#if HAVE_JAVASCRIPT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t