mirror of
https://github.com/django/django.git
synced 2024-12-31 13:35:45 +00:00
Fixed #1240 -- Updated bash completion file to accomodate changes in r3174.
Thanks, Paolo. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ae1234f2a2
commit
3465a4f6f4
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
_django_completion()
|
_django_completion()
|
||||||
{
|
{
|
||||||
local cur prev opts actions action_shell_opts
|
local cur prev opts actions action_shell_opts action_runfcgi_opts
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
@ -42,12 +42,13 @@ _django_completion()
|
|||||||
opts="--help --settings --pythonpath --version"
|
opts="--help --settings --pythonpath --version"
|
||||||
# Actions
|
# Actions
|
||||||
actions="adminindex createcachetable dbshell diffsettings \
|
actions="adminindex createcachetable dbshell diffsettings \
|
||||||
inspectdb install reset runserver \
|
inspectdb install reset runfcgi runserver \
|
||||||
shell sql sqlall sqlclear sqlindexes sqlinitialdata \
|
shell sql sqlall sqlclear sqlindexes sqlinitialdata \
|
||||||
sqlreset sqlsequencereset startapp startproject \
|
sqlreset sqlsequencereset startapp startproject \
|
||||||
syncdb validate"
|
syncdb validate"
|
||||||
# Action's options
|
# Action's options
|
||||||
action_shell_opts="--plain"
|
action_shell_opts="--plain"
|
||||||
|
action_runfcgi_opts="host port socket method maxspare minspare maxchildren daemonize pidfile workdir"
|
||||||
|
|
||||||
if [[ # django-admin.py, ./manage, manage.py
|
if [[ # django-admin.py, ./manage, manage.py
|
||||||
( ${COMP_CWORD} -eq 1 &&
|
( ${COMP_CWORD} -eq 1 &&
|
||||||
@ -64,10 +65,12 @@ _django_completion()
|
|||||||
case ${cur} in
|
case ${cur} in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
|
action=$COMPREPLY
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=( $(compgen -W "${actions}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${actions}" -- ${cur}) )
|
||||||
|
action=$COMPREPLY
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -93,6 +96,17 @@ _django_completion()
|
|||||||
COMPREPLY=( $(compgen -W "$action_shell_opts" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "$action_shell_opts" -- ${cur}) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
runfcgi)
|
||||||
|
COMPREPLY=( $(compgen -W "$action_runfcgi_opts" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
host*|port*|socket*|method*|maxspare*|minspare*|maxchildren*|daemonize*|pidfile*|workdir*)
|
||||||
|
if [ "$action" == "runfcgi" ] ; then
|
||||||
|
COMPREPLY=( $(compgen -W "$action_runfcgi_opts" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
#COMPREPLY=( $(compgen -W "auth core" -- ${cur}) )
|
#COMPREPLY=( $(compgen -W "auth core" -- ${cur}) )
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
|
Loading…
Reference in New Issue
Block a user