]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube-dl.bash-completion
Imported Upstream version 2013.10.23
[youtubedl] / youtube-dl.bash-completion
1 __youtube_dl()
2 {
3 local cur prev opts
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 opts="--help --version --update --ignore-errors --abort-on-error --dump-user-agent --user-agent --referer --list-extractors --extractor-descriptions --proxy --no-check-certificate --cache-dir --no-cache-dir --playlist-start --playlist-end --match-title --reject-title --max-downloads --min-filesize --max-filesize --date --datebefore --dateafter --no-playlist --age-limit --download-archive --rate-limit --retries --buffer-size --no-resize-buffer --test --title --id --literal --auto-number --output --autonumber-size --restrict-filenames --batch-file --no-overwrites --continue --no-continue --cookies --no-part --no-mtime --write-description --write-info-json --write-annotations --write-thumbnail --quiet --simulate --skip-download --get-url --get-title --get-id --get-thumbnail --get-description --get-filename --get-format --newline --no-progress --console-title --verbose --dump-intermediate-pages --youtube-print-sig-code --format --all-formats --prefer-free-formats --max-quality --list-formats --write-sub --write-auto-sub --all-subs --list-subs --sub-format --sub-lang --username --password --netrc --video-password --extract-audio --audio-format --audio-quality --recode-video --keep-video --no-post-overwrites --embed-subs --add-metadata"
7 keywords=":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater"
8
9 if [[ ${cur} =~ : ]]; then
10 COMPREPLY=( $(compgen -W "${keywords}" -- ${cur}) )
11 return 0
12 elif [[ ${cur} == * ]] ; then
13 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
14 return 0
15 fi
16 }
17
18 complete -F __youtube_dl youtube-dl