Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #6661: fixed a bug with bash completion and python -i. Thanks, …

…Soeren Sonnenburg.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aad8342aa43cb9fba8d4989f844df41333719738 1 parent 5ca0b92
Jacob Kaplan-Moss authored February 25, 2008

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  extras/django_bash_completion
10  extras/django_bash_completion
@@ -61,13 +61,13 @@ _django_completion()
61 61
           ||
62 62
           # python manage.py, /some/path/python manage.py (if manage.py exists)
63 63
           ( ${COMP_CWORD} -eq 2 &&
64  
-            ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
65  
-            ( $( basename ${COMP_WORDS[1]} ) == manage.py) &&
  64
+            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
  65
+            ( $( basename -- ${COMP_WORDS[1]} ) == manage.py) &&
66 66
             ( -r ${COMP_WORDS[1]} ) ) 
67 67
           ||
68 68
           ( ${COMP_CWORD} -eq 2 &&
69  
-            ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
70  
-            ( $( basename ${COMP_WORDS[1]} ) == django-admin.py) &&
  69
+            ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&
  70
+            ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) &&
71 71
             ( -r ${COMP_WORDS[1]} ) ) ]] ; then
72 72
 
73 73
         case ${cur} in
@@ -149,7 +149,7 @@ unset pythons
149 149
 if command -v whereis &>/dev/null; then
150 150
     python_interpreters=$(whereis python | cut -d " " -f 2-) 
151 151
     for python in $python_interpreters; do
152  
-        pythons="${pythons} $(basename $python)"
  152
+        pythons="${pythons} $(basename -- $python)"
153 153
     done
154 154
     pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ")
155 155
 else

0 notes on commit aad8342

Please sign in to comment.
Something went wrong with that request. Please try again.