Code

Ticket #3641: django_bash_completion.diff

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

patch to fix whereis error on OS X

Line 
1Index: django_bash_completion
2===================================================================
3--- django_bash_completion      (revision 4664)
4+++ django_bash_completion      (working copy)
5@@ -145,11 +145,13 @@
6 complete -F _django_completion django-admin.py manage.py
7 
8 # Support for multiple interpreters.
9-unset pythons
10+unset pythons
11 if command -v whereis &>/dev/null; then
12-    python_interpreters=$(whereis -b python | cut -d " " -f 2-)
13+    python_interpreters=$(whereis python | cut -d " " -f 2-)
14     for python in $python_interpreters; do
15-        pythons="${pythons} $(basename $python)"
16+               if [ -x ${python} ]; then
17+               pythons="${pythons} $(basename $python)"
18+               fi;
19     done
20     pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
21 else