django-manage: use $words[1] as command with _managepy_cmds

This commit is contained in:
Daniel Hahler 2015-05-17 23:16:01 +02:00
parent 3a2bb8781d
commit 810b70ca2e
1 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,8 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Store $word[1] as manage_cmd to be used for callbacks.
manage_cmd=${words[1]}
_managepy-cleanup(){} _managepy-cleanup(){}
_managepy-compilemessages(){} _managepy-compilemessages(){}
@ -58,8 +60,8 @@ _managepy-help(){
_managepy_cmds(){ _managepy_cmds(){
local line local line
local -a cmd local -a cmd
_call_program help-command ./manage.py help \ _call_program help-command $_managepy_cmd help \
|& sed -n '/^ /s/[(), ]/ /gp' \ 2>/dev/null| sed -n '/^ /s/[(), ]/ /gp' \
| while read -A line; do cmd=($line $cmd) done | while read -A line; do cmd=($line $cmd) done
_describe -t managepy-command 'manage.py command' cmd _describe -t managepy-command 'manage.py command' cmd
} }