Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refs #7268 -- Added django-admin as an alias in the django-bash-compl…

…etion script. Thanks, Raphael Hertzog <hertzog@debian.org>

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f9b9052c551cf2fbd2524de760492330f83e4388 1 parent e146e50
Russell Keith-Magee authored

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  extras/django_bash_completion
10  extras/django_bash_completion
@@ -53,9 +53,10 @@ _django_completion()
53 53
     action_shell_opts="--plain"
54 54
     action_runfcgi_opts="host port socket method maxspare minspare maxchildren daemonize pidfile workdir"
55 55
 
56  
-    if [[ # django-admin.py, ./manage, manage.py
  56
+    if [[ # django-admin.py, django-admin, ./manage, manage.py
57 57
           ( ${COMP_CWORD} -eq 1 &&
58 58
             ( ${COMP_WORDS[0]} == django-admin.py ||
  59
+              ${COMP_WORDS[0]} == django-admin ||
59 60
               ${COMP_WORDS[0]} == ./manage.py ||
60 61
               ${COMP_WORDS[0]} == manage.py ) )
61 62
           ||
@@ -68,6 +69,11 @@ _django_completion()
68 69
           ( ${COMP_CWORD} -eq 2 &&
69 70
             ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
70 71
             ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) &&
  72
+            ( -r ${COMP_WORDS[1]} ) ) 
  73
+          ||
  74
+          ( ${COMP_CWORD} -eq 2 &&
  75
+            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
  76
+            ( $( basename -- ${COMP_WORDS[1]} ) == django-admin) &&
71 77
             ( -r ${COMP_WORDS[1]} ) ) ]] ; then
72 78
 
73 79
         case ${cur} in
@@ -142,7 +148,7 @@ _django_completion()
142 148
     fi
143 149
 }
144 150
 
145  
-complete -F _django_completion django-admin.py manage.py
  151
+complete -F _django_completion django-admin.py manage.py django-admin
146 152
 
147 153
 # Support for multiple interpreters.
148 154
 unset pythons

0 notes on commit f9b9052

Please sign in to comment.
Something went wrong with that request. Please try again.