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 fe7c41083b
commit ca9fc9ec65
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-compilemessages(){}
@ -58,8 +60,8 @@ _managepy-help(){
_managepy_cmds(){
local line
local -a cmd
_call_program help-command ./manage.py help \
|& sed -n '/^ /s/[(), ]/ /gp' \
_call_program help-command $_managepy_cmd help \
2>/dev/null| sed -n '/^ /s/[(), ]/ /gp' \
| while read -A line; do cmd=($line $cmd) done
_describe -t managepy-command 'manage.py command' cmd
}