{zsh,bash}-completion: add missing --no-config flags

Seemingly forgotten, even though the intent was to add them.

Fixes: 15252e13d5
This commit is contained in:
Niklas Haas 2023-09-02 19:42:47 +02:00 committed by sfan5
parent a862f4ff10
commit 1bf6abc62d
2 changed files with 6 additions and 6 deletions

View File

@ -150,7 +150,7 @@ function _mpv_generate_arguments {
function _mpv_generate_protocols {
_mpv_completion_protocols=()
local list_protos_line
for list_protos_line in "${(@f)$($~words[1] --list-protocols)}"; do
for list_protos_line in "${(@f)$($~words[1] --no-config --list-protocols)}"; do
if [[ $list_protos_line =~ $'^[ \t]+(.*)' ]]; then
_mpv_completion_protocols+="$match[1]"
fi
@ -211,7 +211,7 @@ case $state in
esac
local -a values
local current
for current in "${(@f)$($~words[1] --${option_name}=help)}"; do
for current in "${(@f)$($~words[1] --no-config --${option_name}=help)}"; do
[[ $current =~ $pattern ]] || continue;
local name=${match[name_group]//:/\\:} desc=${match[desc_group]}
if [[ -n $desc ]]; then

View File

@ -42,7 +42,7 @@ _mpv_get_args()
_filedir 2>/dev/null || COMPREPLY=($(compgen -f))
return 0
else
candidates=($(mpv $1=help | grep -v ':' | awk '{print $1;}'))
candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}'))
candidates+=("help")
fi
;;
@ -50,16 +50,16 @@ _mpv_get_args()
candidates=("yes" "no" "help")
;;
Choices:|Object)
candidates=($(mpv $1=help | grep -v ':' | awk '{print $1;}'))
candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}'))
candidates+=("help")
;;
Image)
candidates=($(mpv $1=help))
candidates=($(mpv --no-config $1=help))
candidates=("${candidates[@]:2}")
candidates+=("help")
;;
Profile)
candidates=($(mpv $1= | grep -v ':' | awk '{print $1;}'))
candidates=($(mpv --no-config $1= | grep -v ':' | awk '{print $1;}'))
;;
*)
# There are other categories; some of which we could do something smarter