[Bash-completion-devel] Bug#749115: bash-completion: Please add support for the mpv video player
Alessandro Ghedini
ghedo at debian.org
Sat May 24 17:42:55 UTC 2014
On sab, mag 24, 2014 at 11:07:00 +0200, Moritz Muehlenhoff wrote:
> Package: bash-completion
> Severity: wishlist
> Tags: patch
>
> Hi,
> please add support for mpv (it's a fork of mplayer). Patch attached.
Here's some nitpick:
> # mpv(1) completion -*- shell-script -*-
>
> _mpv()
> {
> local cur prev words cword
> _init_completion -n : || return
>
> local cmd=${words[0]} i j k=0
>
> case $prev in
> -audiofile)
FWIW, the --audiofile option was renamed to --audio-file. This change hasn't
been "released" yet, altough it's available in the upstream git snapshot in
experimental. If you were to add more options taken from the mplayer bash
completion, there's a chance that they might have been renamed or removed too.
Also, it might be possible to (partially) generate the completion using a script
that parses the output of mpv --list-options.
> _filedir '@(mp3|mpg|ogg|w?(a)v|mid|flac|mka|ape)'
Adding ac3 here would probably be nice too.
> -sub)
Same as above: option renamed to --sub-file in experimental.
> _filedir '@(srt|sub|txt|utf|rar|mpsub|smi|js|ssa|ass)'
Support for mpsub, sami (.smi) and jacosub (.js) was removed in experimental.
Since they are quite rare it might be worth removing them now, instead of
waiting.
In any case I don't use bash, so I can't say if it works correctly or not.
Cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20140524/06255dba/attachment.sig>
More information about the Bash-completion-devel
mailing list