/etc/bash_completion.d/scrapy is in python-scrapy 0.14.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # bash completion for the Scrapy command-line tool
_scrapy_completion() {
local cmd cur commands spiders
cmd=${COMP_WORDS[1]}
cur=${COMP_WORDS[2]}
case "$cmd" in
crawl|edit)
spiders=$(scrapy list 2>/dev/null) || spiders=""
COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W "$spiders" -- "$cur"))
;;
*)
if [ $COMP_CWORD -eq 1 ]; then
commands="crawl deploy fetch genspider list parse queue runserver runspider settings shell startproject view"
COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cmd"))
fi
;;
esac
}
complete -F _scrapy_completion -o default scrapy
|