From f9b9052c551cf2fbd2524de760492330f83e4388 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 18 Jun 2008 13:17:23 +0000 Subject: [PATCH] Refs #7268 -- Added django-admin as an alias in the django-bash-completion script. Thanks, Raphael Hertzog git-svn-id: http://code.djangoproject.com/svn/django/trunk@7690 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- extras/django_bash_completion | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extras/django_bash_completion b/extras/django_bash_completion index 7b2b1947d8a..686f090b95d 100644 --- a/extras/django_bash_completion +++ b/extras/django_bash_completion @@ -53,9 +53,10 @@ _django_completion() 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, django-admin, ./manage, manage.py ( ${COMP_CWORD} -eq 1 && ( ${COMP_WORDS[0]} == django-admin.py || + ${COMP_WORDS[0]} == django-admin || ${COMP_WORDS[0]} == ./manage.py || ${COMP_WORDS[0]} == manage.py ) ) || @@ -68,6 +69,11 @@ _django_completion() ( ${COMP_CWORD} -eq 2 && ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) && ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) && + ( -r ${COMP_WORDS[1]} ) ) + || + ( ${COMP_CWORD} -eq 2 && + ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) && + ( $( basename -- ${COMP_WORDS[1]} ) == django-admin) && ( -r ${COMP_WORDS[1]} ) ) ]] ; then case ${cur} in @@ -142,7 +148,7 @@ _django_completion() fi } -complete -F _django_completion django-admin.py manage.py +complete -F _django_completion django-admin.py manage.py django-admin # Support for multiple interpreters. unset pythons