Author: jacob
Date: 2008-02-25 13:38:09 -0600 (Mon, 25 Feb 2008)
New Revision: 7156

Modified:
   django/trunk/extras/django_bash_completion
Log:
Fixed #6661: fixed a bug with bash completion and python -i. Thanks, Soeren 
Sonnenburg.

Modified: django/trunk/extras/django_bash_completion
===================================================================
--- django/trunk/extras/django_bash_completion  2008-02-25 18:02:13 UTC (rev 
7155)
+++ django/trunk/extras/django_bash_completion  2008-02-25 19:38:09 UTC (rev 
7156)
@@ -61,13 +61,13 @@
           ||
           # python manage.py, /some/path/python manage.py (if manage.py exists)
           ( ${COMP_CWORD} -eq 2 &&
-            ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
-            ( $( basename ${COMP_WORDS[1]} ) == manage.py) &&
+            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
+            ( $( basename -- ${COMP_WORDS[1]} ) == manage.py) &&
             ( -r ${COMP_WORDS[1]} ) ) 
           ||
           ( ${COMP_CWORD} -eq 2 &&
-            ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
-            ( $( basename ${COMP_WORDS[1]} ) == django-admin.py) &&
+            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
+            ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) &&
             ( -r ${COMP_WORDS[1]} ) ) ]] ; then
 
         case ${cur} in
@@ -149,7 +149,7 @@
 if command -v whereis &>/dev/null; then
     python_interpreters=$(whereis python | cut -d " " -f 2-) 
     for python in $python_interpreters; do
-        pythons="${pythons} $(basename $python)"
+        pythons="${pythons} $(basename -- $python)"
     done
     pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
 else


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to