Ticket #18903: patch-extras-django_bash_completion.3.diff

File patch-extras-django_bash_completion.3.diff, 1.1 KB (added by arthur@…, 16 years ago)

py26-django bash_completion fix

  • extras/django_bash_completion

    old new  
    5555
    5656    if [[ # django-admin.py, django-admin, ./manage, manage.py
    5757          ( ${COMP_CWORD} -eq 1 &&
    58             ( ${COMP_WORDS[0]} == django-admin.py ||
     58            ( ${COMP_WORDS[0]} == django-admin-?([2-9]\.[0-9]).py ||
    5959              ${COMP_WORDS[0]} == django-admin ||
    6060              ${COMP_WORDS[0]} == ./manage.py ||
    6161              ${COMP_WORDS[0]} == manage.py ) )
     
    6868          ||
    6969          ( ${COMP_CWORD} -eq 2 &&
    7070            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
    71             ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) &&
     71            ( $( basename -- ${COMP_WORDS[1]} ) == django-admin-?(2-9]\.[0-9]).py) &&
    7272            ( -r ${COMP_WORDS[1]} ) )
    7373          ||
    7474          ( ${COMP_CWORD} -eq 2 &&
     
    149149    fi
    150150}
    151151
    152 complete -F _django_completion django-admin.py manage.py django-admin
     152complete -F _django_completion django-admin-2.6.py manage.py django-admin
    153153
    154154# Support for multiple interpreters.
    155155unset pythons