Package Details: mpv-bash-completion-git 8:3.3.18-1

Git Clone URL: (read-only, click to copy)
Package Base: mpv-bash-completion-git
Description: Bash completion for the mpv video player
Upstream URL:
Keywords: bash mpv
Licenses: GPL
Conflicts: mpv-bash-completion
Provides: mpv-bash-completion
Submitter: 2ion
Maintainer: 2ion
Last Packager: 2ion
Votes: 21
Popularity: 0.82
First Submitted: 2015-03-12 15:14
Last Updated: 2020-01-11 12:51

Latest Comments

1 2 Next › Last »

2ion commented on 2020-01-11 12:52

Build should now be fixed for mpv > 0.31.0 (mpv-git).

2ion commented on 2020-01-09 07:49

@laichaheng Can't reproduce with mpv 0.31.0 and lua 5.3.5. Could you please specify the versions of these softwares and additionally tell me the output of locale? That is, the complete output of this little script (please use a pastebin!):

mpv --version
lua -v
echo "========= default locale ==========="
env MPV_BASHCOMPGEN_VERBOSE=1 /usr/lib/mpv-bash-completion/generate
echo "========= C locale ==========="
env MPV_BASHCOMPGEN_VERBOSE=1 LANG=C LC_ALL=C /usr/lib/mpv-bash-completion/generate

Can you try running /usr/lib/mpv-bash-completion/generate directly from the console and observe if the issue happens in this context again, and can you run it again as LC_ALL=C LANG=C /usr/lib/mpv-bash-completion/generate and observe if there's a difference?

laichiaheng commented on 2020-01-09 02:01

lua: attempt to index a nil value

stack traceback:

[C]: in for iterator 'for iterator'

/usr/lib/mpv-bash-completion/generate:83: in upvalue 'map'

/usr/lib/mpv-bash-completion/generate:89: in function </usr/lib/mpv-bash-completion/generate:89>
(...tail calls...)

/usr/lib/mpv-bash-completion/generate:662: in upvalue 'createScript'

/usr/lib/mpv-bash-completion/generate:749: in local 'main'

/usr/lib/mpv-bash-completion/generate:753: in main chunk

[C]: in ?

錯誤: 命令未能被正確執行

2ion commented on 2018-08-29 20:10

@gesh: Why would you want to retain a completion definition if you uninstalled the package? I can't think of a good reason right now.

Besides, due to how /usr/share/bash-completion/bash_completion works, the file will be sourced regardless of its extension, so now you'd end up with a .pacsave that's still getting sourced and need to care about it -- one more thing to think about.

I don't see any upside in terms of user experience in your suggestion.

gesh commented on 2018-08-29 18:44

Hi. Instead of deleting /etc/bash_completion.d/mpv using a .install file, wouldn't it be possible to just install an empty file in the package and use the hook to populate it? Judging by pacman(8)'s description of how it handles .pacnew files, this should Just Work(TM), but I haven't actually tried it. Thanks for the package!

2ion commented on 2017-10-29 15:23


1. Both and mpv-bash-completion are ugly hacks. They both rely on parsing mpv --list-options or mpv --$option help, the format of which changes all the time, there's no standard, just patterns to cobble together. Something is broken all the time. The thing that's ultimately needed is an API which exports the mpv option tree completely, options plus parameters plus parameter defaults plus parameter types plus alias information, following some defined schema, which can be used as the input for any completion generator. I don't want to upstream ugly hacks.

2. mpv-bash-completion is more complex than, part of that being due to Bash providing almost no completion framework at all and part being due to mpv-bash-completion probably having more features (filter and object parameter completion) (I didn't check). To upstream it, the code would need refactoring and documentation. And then it needs to be maintained, with frequent fixes due to (1), which brings me to

3. I don't want to relinquish ownership of the code and go through mpv maintainers all the time to fix things. Again, if we had solved (1), the code could be written correctly, upstreamed and just work.

I'm hoping to invest time into (1) at some point, but that'll happen in 2018 at the earliest.

sl1pkn07 commented on 2017-10-28 16:59


one question. why not try to make include this into mpv sources like zsh completion?


2ion commented on 2016-06-27 15:08

Version 3 is a full rewrite in Lua which fixes many incorrect or missing completions. Also, this package installs a pacman hook which automatically updates the completion between mpv version upgrades.

2ion commented on 2016-03-06 04:55

@sekret: Sorry about the version number messup; I forgot to push the last change to the PKGBUILD last night which normalized versioning.

As for the (ab-)use of the epoch field: Until the introduction of hooks, the package needed to be rebuilt manually for any update to mpv that changed the set of available options. In order to be able to see if the currently installed completion was out-of-date, the pkgver was set to the version of the mpv package the completion was generated from. Accordingly, whenever I made a substantial improvement to the upstream source or the PKGBUILD (both of which I own, and I'm using the PKGBUILD to install it on my system) I'd liked to push to every user, I'd increment the epoch in order to force rebuilds as I couldn't know what actual version number the package on users' systems would have. The weird package number you saw earlier was the version from my own mpv package mpv-legacy-af-git, a slip-up.

From now (epoch 8) onward, with hooks for triggering rebuilds having been made available and implemented here, versioning will (roughly) follow packaging guidelines. pkgver is now a static field.

sekret commented on 2016-03-05 23:49

And how did you come up with this pkgver 0.16.0+1 ??? When I run makepkg on your PKGBUILD, I get 0.16.0 , so what is this "+1" ??? With this pkgver you provide cower always reports your package as outdated on my machine, although I'm up to date.