fish-shell/share/completions/mpv.fish
Johannes Altmanninger 446f4efa65 completions/mpv: speed up loading
Goes from 200 ms to 100 ms. Probably there is some overhead when calling
complete in a loop; we might be able to fix that.
2022-04-09 22:33:23 +02:00

11 lines
619 B
Fish

set -l options (command mpv --list-options 2>/dev/null)
complete -c mpv -l(string replace -fr '^\s*--([\w-]+).*' '$1' -- $options)
complete -c mpv -lno-(string replace -fr '^\s*--([\w-]+).*Flag.*' '$1' -- $options)
complete -c mpv -l start -x -d "Seek to given position (%, s, hh:mm:ss)"
complete -c mpv -l no-audio -d "Disable audio"
complete -c mpv -l no-audio-display -d "Hide attached picture for audio"
complete -c mpv -l no-video -d "Disable video"
complete -c mpv -l fs -d "Fullscreen playback"
complete -c mpv -l sub-file -r -d "Specify subtitle file"
complete -c mpv -l playlist -r -d "Specify playlist file"