From 15252e13d5bb367a8f86ffbc5474488b841dc96c Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 18 Jul 2023 10:51:51 +0200 Subject: [PATCH] {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. --- etc/_mpv.zsh | 2 +- etc/mpv.bash-completion | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/_mpv.zsh b/etc/_mpv.zsh index df115d19bd..12c3d82b7c 100644 --- a/etc/_mpv.zsh +++ b/etc/_mpv.zsh @@ -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 diff --git a/etc/mpv.bash-completion b/etc/mpv.bash-completion index c08010ae7c..286e776bb0 100644 --- a/etc/mpv.bash-completion +++ b/etc/mpv.bash-completion @@ -18,7 +18,7 @@ # # Cache all the mpv options -_mpv_options=$(mpv --list-options) +_mpv_options=$(mpv --no-config --list-options) _mpv_get_args() {