mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 10:02:17 +00:00
{zsh,bash}-completion: add missing --no-config flags
Seemingly forgotten, even though the intent was to add them. Fixes: 15252e13d5bb367a8f86ffbc5474488b841dc96c
This commit is contained in:
parent
a862f4ff10
commit
1bf6abc62d
@ -150,7 +150,7 @@ function _mpv_generate_arguments {
|
|||||||
function _mpv_generate_protocols {
|
function _mpv_generate_protocols {
|
||||||
_mpv_completion_protocols=()
|
_mpv_completion_protocols=()
|
||||||
local list_protos_line
|
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
|
if [[ $list_protos_line =~ $'^[ \t]+(.*)' ]]; then
|
||||||
_mpv_completion_protocols+="$match[1]"
|
_mpv_completion_protocols+="$match[1]"
|
||||||
fi
|
fi
|
||||||
@ -211,7 +211,7 @@ case $state in
|
|||||||
esac
|
esac
|
||||||
local -a values
|
local -a values
|
||||||
local current
|
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;
|
[[ $current =~ $pattern ]] || continue;
|
||||||
local name=${match[name_group]//:/\\:} desc=${match[desc_group]}
|
local name=${match[name_group]//:/\\:} desc=${match[desc_group]}
|
||||||
if [[ -n $desc ]]; then
|
if [[ -n $desc ]]; then
|
||||||
|
@ -42,7 +42,7 @@ _mpv_get_args()
|
|||||||
_filedir 2>/dev/null || COMPREPLY=($(compgen -f))
|
_filedir 2>/dev/null || COMPREPLY=($(compgen -f))
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
candidates=($(mpv $1=help | grep -v ':' | awk '{print $1;}'))
|
candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}'))
|
||||||
candidates+=("help")
|
candidates+=("help")
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -50,16 +50,16 @@ _mpv_get_args()
|
|||||||
candidates=("yes" "no" "help")
|
candidates=("yes" "no" "help")
|
||||||
;;
|
;;
|
||||||
Choices:|Object)
|
Choices:|Object)
|
||||||
candidates=($(mpv $1=help | grep -v ':' | awk '{print $1;}'))
|
candidates=($(mpv --no-config $1=help | grep -v ':' | awk '{print $1;}'))
|
||||||
candidates+=("help")
|
candidates+=("help")
|
||||||
;;
|
;;
|
||||||
Image)
|
Image)
|
||||||
candidates=($(mpv $1=help))
|
candidates=($(mpv --no-config $1=help))
|
||||||
candidates=("${candidates[@]:2}")
|
candidates=("${candidates[@]:2}")
|
||||||
candidates+=("help")
|
candidates+=("help")
|
||||||
;;
|
;;
|
||||||
Profile)
|
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
|
# There are other categories; some of which we could do something smarter
|
||||||
|
Loading…
Reference in New Issue
Block a user