A feature-rich command-line audio/video downloader
added automatically generated bash-completion; closes #191
Filippo Valsordace7b2a40d04d
diff --git a/Makefile b/Makefileindex c31850a551..da9103cd27 100644--- a/Makefile+++ b/Makefile@@ -1,4 +1,4 @@-all: compile exe readme man-page update-latest+all: compile exe readme man-page bash-completion update-latestupdate-latest:./youtube-dl --version > LATEST_VERSION@@ -18,6 +18,11 @@ readme:man-page:pandoc -s -w man README.md -o youtube-dl.1+bash-completion:+ @options=`egrep -o '(--[a-z-]+) ' README.md | sort -u | xargs echo` && \+ content=`sed "s/opts=\"[^\"]*\"/opts=\"$${options}\"/g" youtube-dl.bash-completion` && \+ echo "$${content}" > youtube-dl.bash-completion+compile:zip --quiet --junk-paths youtube-dl youtube_dl/*.pyecho '#!/usr/bin/env python' > youtube-dl@@ -30,5 +35,6 @@ exe:install:install -m 755 --owner root --group root youtube-dl /usr/local/bin/install -m 644 --owner root --group root youtube-dl.1 /usr/local/man/man1+ install -m 644 --owner root --group root youtube-dl.bash-completion /etc/bash_completion.d/youtube-dl-.PHONY: all update-latest readme man-page compile exe install\ No newline at end of file+.PHONY: all update-latest readme man-page bash-completion compile exe install\ No newline at end of filediff --git a/youtube-dl.bash-completion b/youtube-dl.bash-completionnew file mode 100644index 0000000000..8704d0fd3a--- /dev/null+++ b/youtube-dl.bash-completion@@ -0,0 +1,14 @@+__youtube-dl()+{+ local cur prev opts+ COMPREPLY=()+ cur="${COMP_WORDS[COMP_CWORD]}"+ opts="--all-formats --audio-format --audio-quality --auto-number --batch-file --console-title --continue --cookies --dump-user-agent --extract-audio --format --get-description --get-filename --get-format --get-thumbnail --get-title --get-url --help --ignore-errors --keep-video --list-extractors --list-formats --literal --match-title --max-downloads --max-quality --netrc --no-continue --no-mtime --no-overwrites --no-part --no-progress --output --password --playlist-end --playlist-start --prefer-free-formats --quiet --rate-limit --reject-title --retries --simulate --skip-download --srt-lang --title --update --username --verbose --version --write-description --write-info-json --write-srt"++ if [[ ${cur} == * ]] ; then+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )+ return 0+ fi+}++complete -F __youtube-dl youtube-dl