Ticket #6661: completion_fix.diff
File completion_fix.diff, 1.5 KB (added by , 17 years ago) |
---|
-
/
old new 62 62 || 63 63 # python manage.py, /some/path/python manage.py (if manage.py exists) 64 64 ( ${COMP_CWORD} -eq 2 && 65 ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&66 ( $( basename ${COMP_WORDS[1]} ) == manage.py) &&65 ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) && 66 ( $( basename -- ${COMP_WORDS[1]} ) == manage.py) && 67 67 ( -r ${COMP_WORDS[1]} ) ) 68 68 || 69 69 ( ${COMP_CWORD} -eq 2 && 70 ( $( basename ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) &&70 ( $( basename -- ${COMP_WORDS[0]} ) == python?([1-9]\.[0-9]) ) && 71 71 ( 72 ( $( basename ${COMP_WORDS[1]} ) == django-admin.py) ||73 ( $( basename ${COMP_WORDS[1]} ) == django-admin)72 ( $( basename -- ${COMP_WORDS[1]} ) == django-admin.py) || 73 ( $( basename -- ${COMP_WORDS[1]} ) == django-admin) 74 74 ) && 75 75 ( -r ${COMP_WORDS[1]} ) ) ]] ; then 76 76 … … 153 153 if command -v whereis &>/dev/null; then 154 154 python_interpreters=$(whereis python | cut -d " " -f 2-) 155 155 for python in $python_interpreters; do 156 pythons="${pythons} $(basename $python)"156 pythons="${pythons} $(basename -- $python)" 157 157 done 158 158 pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") 159 159 else