7a5c1cfe93
* All modules and binary names are changed * All documentation references changed * yt-dlp no longer loads youtube-dlc config files * All URLs changed to point to organization account Co-authored-by: Pccode66 Co-authored-by: pukkandan
30 lines
No EOL
864 B
Text
30 lines
No EOL
864 B
Text
#compdef yt-dlp
|
|
|
|
__yt_dlp() {
|
|
local curcontext="$curcontext" fileopts diropts cur prev
|
|
typeset -A opt_args
|
|
fileopts="{{fileopts}}"
|
|
diropts="{{diropts}}"
|
|
cur=$words[CURRENT]
|
|
case $cur in
|
|
:)
|
|
_arguments '*: :(::ytfavorites ::ytrecommended ::ytsubscriptions ::ytwatchlater ::ythistory)'
|
|
;;
|
|
*)
|
|
prev=$words[CURRENT-1]
|
|
if [[ ${prev} =~ ${fileopts} ]]; then
|
|
_path_files
|
|
elif [[ ${prev} =~ ${diropts} ]]; then
|
|
_path_files -/
|
|
elif [[ ${prev} == "--remux-video" ]]; then
|
|
_arguments '*: :(mp4 mkv)'
|
|
elif [[ ${prev} == "--recode-video" ]]; then
|
|
_arguments '*: :(mp4 flv ogg webm mkv)'
|
|
else
|
|
_arguments '*: :({{flags}})'
|
|
fi
|
|
;;
|
|
esac
|
|
}
|
|
|
|
__yt_dlp |