Ticket #1240: a_better_app_completion.diff

File a_better_app_completion.diff, 790 bytes (added by paolo <paolo@…>, 9 years ago)

A patch to improve application name completion

  • django_bash_completion

     
    6060          ( ${COMP_CWORD} -eq 2 &&
    6161            ( $( basename ${COMP_WORDS[0]} ) == python ) &&
    6262            ( $( basename ${COMP_WORDS[1]} ) == manage.py) &&
     63            ( -r ${COMP_WORDS[1]} ) )
     64          ||
     65          ( ${COMP_CWORD} -eq 2 &&
     66            ( $( basename ${COMP_WORDS[0]} ) == python ) &&
     67            ( $( basename ${COMP_WORDS[1]} ) == django-admin.py) &&
    6368            ( -r ${COMP_WORDS[1]} ) ) ]] ; then
    6469
    6570        case ${cur} in
     
    135140}
    136141
    137142complete -F _django_completion django-admin.py manage.py
     143complete -F _django_completion -o default python
Back to Top