Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@freakboy3742 freakboy3742 authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 extras/django_bash_completion
View
10 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
Please sign in to comment.
Something went wrong with that request. Please try again.