Ticket #3641: django_bash_completion.diff

File django_bash_completion.diff, 769 bytes (added by roberto.c.aguilar _at_ gmail _dot_ com, 8 years ago)

patch to fix whereis error on OS X

  • django_bash_completion

     
    145145complete -F _django_completion django-admin.py manage.py
    146146
    147147# Support for multiple interpreters.
    148 unset pythons
     148unset pythons 
    149149if command -v whereis &>/dev/null; then
    150     python_interpreters=$(whereis -b python | cut -d " " -f 2-)
     150    python_interpreters=$(whereis python | cut -d " " -f 2-)
    151151    for python in $python_interpreters; do
    152         pythons="${pythons} $(basename $python)"
     152                if [ -x ${python} ]; then
     153                pythons="${pythons} $(basename $python)"
     154                fi;
    153155    done
    154156    pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
    155157else
Back to Top