diff --git a/extras/scrapy_bash_completion b/extras/scrapy_bash_completion index 3e4750e3d..f311a5a28 100644 --- a/extras/scrapy_bash_completion +++ b/extras/scrapy_bash_completion @@ -10,8 +10,10 @@ _scrapy_completion() { COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W "$spiders" -- "$cur")) ;; *) - commands="crawl fetch genspider list parse queue runserver runspider settings shell startproject view" - COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cmd")) + if [ $COMP_CWORD -eq 1 ]; then + commands="crawl fetch genspider list parse queue runserver runspider settings shell startproject view" + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cmd")) + fi ;; esac }