mirror of https://github.com/scrapy/scrapy.git
Merge pull request #4291 from seregaxvm/master
add zsh -h autocomplete option
This commit is contained in:
commit
7e341e0f6b
|
|
@ -1,11 +1,12 @@
|
||||||
#compdef scrapy
|
#compdef scrapy
|
||||||
_scrapy() {
|
_scrapy() {
|
||||||
local context state state_descr line
|
local context state state_descr line
|
||||||
|
local ret=1
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
_arguments \
|
_arguments \
|
||||||
"(- 1 *)--help[Help]" \
|
"(- 1 *)"{-h,--help}"[Help]" \
|
||||||
"1: :->command" \
|
"1: :->command" \
|
||||||
"*:: :->args"
|
"*:: :->args" && ret=0
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
command)
|
command)
|
||||||
|
|
@ -134,6 +135,8 @@ _scrapy() {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
_scrapy_cmds() {
|
_scrapy_cmds() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue