you-get/contrib/completion/you-get.fish
Zhiming Wang 3b4a576e6c
Add shell completion definitions for Bash, Fish and Zsh
Paths of completion definitions in this repo are inconsequential, and I
don't know a convention for that, so I just modelled it on git.git
https://github.com/git/git/tree/master/contrib/completion. What's
different here is that instead of using a uniform naming scheme for each
file (you-get-completion.<shellname>), I'm using the conventional name
for each shell, which means _you-get for Zsh, for instance. Users of
each shell should be able to pick out the completion definition for
their shell based on the filenames; in the worst case, they can still
tell from the comment at the top of each file.

Note that I'm no expert on Bash or Fish completion, so
you-get-completion.bash and you-get.fish may not be written in the
idiomatic way. (you-get-completion.bash is most certainly not idiomatic,
if there's an idiom at all.)

Closes #1178.
2016-05-28 18:50:50 -07:00

24 lines
1.6 KiB
Fish

# Fish completion definition for you-get.
complete -c you-get -s V -l version -d 'print version and exit'
complete -c you-get -s h -l help -d 'print help and exit'
complete -c you-get -s i -l info -d 'print extracted information'
complete -c you-get -s u -l url -d 'print extracted information'
complete -c you-get -l json -d 'print extracted URLs in JSON format'
complete -c you-get -s n -l no-merge -d 'do not merge video parts'
complete -c you-get -l no-caption -d 'do not download captions'
complete -c you-get -s f -l force -d 'force overwrite existing files'
complete -c you-get -s F -l format -x -d 'set video format to the specified stream id'
complete -c you-get -s O -l output-filename -d 'set output filename' \
-x -a '(__fish_complete_path (commandline -ct) "output filename")'
complete -c you-get -s o -l output-dir -d 'set output directory' \
-x -a '(__fish_complete_directories (commandline -ct) "output directory")'
complete -c you-get -s p -l player -x -d 'stream extracted URL to the specified player'
complete -c you-get -s c -l cookies -d 'load cookies.txt or cookies.sqlite' \
-x -a '(__fish_complete_path (commandline -ct) "cookies.txt or cookies.sqlite")'
complete -c you-get -s x -l http-proxy -x -d 'use the specified HTTP proxy for downloading'
complete -c you-get -s y -l extractor-proxy -x -d 'use the specified HTTP proxy for extraction only'
complete -c you-get -l no-proxy -d 'do not use a proxy'
complete -c you-get -s t -l timeout -x -d 'set socket timeout'
complete -c you-get -s d -l debug -d 'show traceback and other debug info'