mpv/waftools
Philip Sequeira 2712db8238 zsh completion: move generation to runtime and improve
The completion function itself now parses --list-options on the first
tab press and caches the results. This does mean a slight delay on that
first tab press, but it will only do this if the argument being
completed looks like an option (i.e. starts with "-"), so there is never
a delay when just completing a file name. I've also put some effort into
making it reasonably fast; on my machine it's consistently under 100 ms,
more than half of which is mpv itself.

Installation of zsh completion is now done unconditionally because it's
nothing more than copying a file. If you really don't want it installed,
set zshdir to empty: `./waf configure --zshdir= ...`

Improvements in functionality compared to the old script:

 * Produces the right results for mpv binaries other than the one it was
   installed with (like a dev build for testing changes).

 * Does not require running mpv at build time, so it won't cause
   problems with cross compilation.

 * Handles aliases.

 * Slightly nicer handling of options that take comma-separated values
   and/or sub-options: A space is now inserted at the end instead of a
   comma, allowing you to immediately start typing the next argument,
   but typing a comma will still remove the automatically added space,
   and = and : will now do that too, so you can immediately add a
   sub-option.

 * More general/flexible handling of values for options that print their
   possible values with --option=help. The code as is could handle quite
   a few more options (*scale, demuxers, decoders, ...), but nobody
   wants to maintain that list here so we'll just stick with what the
   old completion script already did.
2019-09-27 13:19:29 +02:00
..
checks build: add check for macOS SDK version 2019-07-21 18:13:07 +03:00
detections build: fix swift linking with upcoming xcode 11 2019-09-22 17:07:51 +03:00
fragments wscript: Remove code check for cuda hwaccel 2018-05-10 22:43:08 +03:00
generators zsh completion: move generation to runtime and improve 2019-09-27 13:19:29 +02:00
__init__.py
clang_compilation_database.py waftools: update clang_compilation_database 2018-05-17 13:23:26 +02:00
dependencies.py
deps_parser.py
features.py
inflector.py
syms.py
waf_customizations.py build: fix linking libmpv when swift features are build 2018-07-08 14:39:04 +03:00