Skip to content

Commit

Permalink
Refs django#7268 -- Added django-admin as an alias in the django-bash…
Browse files Browse the repository at this point in the history
…-completion 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
freakboy3742 committed Jun 18, 2008
1 parent e146e50 commit f9b9052
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions extras/django_bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
||
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f9b9052

Please sign in to comment.