summaryrefslogtreecommitdiffstats
path: root/etc/mpv.bash-completion
Commit message (Collapse)AuthorAgeFilesLines
* bash-completion: parse the mpv options lazilyGabriele Mazzotta2024-01-211-9/+30
| | | | | Parse and cache the options lazily not to impact the shell startup time.
* {zsh,bash}-completion: use config when autocompleting profilesPhilip Langdale2023-09-031-2/+8
| | | | | | | | We were over-enthusiastic when introducing --no-config into the autocompletions. When autocompleting profiles, you actually need the config, because that's where the profiles come from. zsh is untested - I don't use it.
* {zsh,bash}-completion: add missing --no-config flagsNiklas Haas2023-09-021-4/+4
| | | | | | Seemingly forgotten, even though the intent was to add them. Fixes: 15252e13d5bb367a8f86ffbc5474488b841dc96c
* {zsh,bash}-completion: run mpv with --no-configsfan52023-07-191-1/+1
| | | | | | | Reading the config when we're just interested in the option list (not sure why mpv does that anyway) only has the potential to mess this process up when it prints errors or the user has funny options like msg-level or log-file set, so avoid doing so.
* bash-completion: do not complete removed optionssfan52023-07-191-3/+6
|
* bash completion: Allow completions to work without external functionsArthur Williams2021-09-051-4/+3
| | | | | | | | | | If bash_completion wasn't installed, _filedir wouldn't be defined which led to all filename-based completions to error out. Specifically autocompletion would fail when a filename was expected and when bash_completion wasn't installed. Now we fall back to `compgen -f` if _filedir fails. According to _filedir's comments, compgen doesn't handle files with spaces well, but it is still better to complete most files than none.
* bash completion: complete ao/af/vo/vf optionsPhilip Langdale2020-02-081-1/+1
| | | | | I didn't handle these originally, but it turns out that they can be handled with the samel logic as Choice options.
* bash completion: Cache the options listPhilip Langdale2020-02-081-8/+11
| | | | | | The bash completion seems to be working decently at this point, so I feel comfortable caching the options output to improve the performance of the completion.
* bash completion: only generate option list when neededPhilip Langdale2020-01-131-5/+5
| | | | | | | | | | Right now we are generating the fully option list before doing anything else. That makes filename completion significantly slower than it was before, for no gain. It's easy to only generate the option list when it's actually needed. I also know I could additionally cache the option list across invocations, but I'm not doing that yet to make testing easier.
* bash completion: add initial implementation of bash completionPhilip Langdale2020-01-091-0/+112
While we've had a zsh completion script for a while, we haven't had one for bash. This one is reasonably comprehensive, although there are improvements one could imagine for certain options.