mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 19:52:14 +00:00
{zsh,bash}-completion: run mpv with --no-config
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.
This commit is contained in:
parent
5f664e2a1d
commit
15252e13d5
@ -42,7 +42,7 @@ function _mpv_generate_arguments {
|
||||
local -a option_aliases=()
|
||||
|
||||
local list_options_line
|
||||
for list_options_line in "${(@f)$($~words[1] --list-options)}"; do
|
||||
for list_options_line in "${(@f)$($~words[1] --no-config --list-options)}"; do
|
||||
|
||||
[[ $list_options_line =~ $'^[ \t]+--([^ \t]+)[ \t]*(.*)' ]] || continue
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#
|
||||
|
||||
# Cache all the mpv options
|
||||
_mpv_options=$(mpv --list-options)
|
||||
_mpv_options=$(mpv --no-config --list-options)
|
||||
|
||||
_mpv_get_args()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user