Loading extras/django_bash_completion +4 −2 Original line number Diff line number Diff line Loading @@ -42,10 +42,10 @@ complete -F _django_completion -o default django-admin.py manage.py django-admin _python_django_completion() { if [[ ${COMP_CWORD} -ge 2 ]]; then PYTHON_EXE=${COMP_WORDS[0]##*/} local PYTHON_EXE=${COMP_WORDS[0]##*/} echo $PYTHON_EXE | egrep "python([2-9]\.[0-9])?" >/dev/null 2>&1 if [[ $? == 0 ]]; then PYTHON_SCRIPT=${COMP_WORDS[1]##*/} local PYTHON_SCRIPT=${COMP_WORDS[1]##*/} echo $PYTHON_SCRIPT | egrep "manage\.py|django-admin(\.py)?" >/dev/null 2>&1 if [[ $? == 0 ]]; then COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]:1}" \ Loading @@ -63,9 +63,11 @@ if command -v whereis &>/dev/null; then for python in $python_interpreters; do pythons="${pythons} ${python##*/}" done unset python_interpreters pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") else pythons=python fi complete -F _python_django_completion -o default $pythons unset pythons Loading
extras/django_bash_completion +4 −2 Original line number Diff line number Diff line Loading @@ -42,10 +42,10 @@ complete -F _django_completion -o default django-admin.py manage.py django-admin _python_django_completion() { if [[ ${COMP_CWORD} -ge 2 ]]; then PYTHON_EXE=${COMP_WORDS[0]##*/} local PYTHON_EXE=${COMP_WORDS[0]##*/} echo $PYTHON_EXE | egrep "python([2-9]\.[0-9])?" >/dev/null 2>&1 if [[ $? == 0 ]]; then PYTHON_SCRIPT=${COMP_WORDS[1]##*/} local PYTHON_SCRIPT=${COMP_WORDS[1]##*/} echo $PYTHON_SCRIPT | egrep "manage\.py|django-admin(\.py)?" >/dev/null 2>&1 if [[ $? == 0 ]]; then COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]:1}" \ Loading @@ -63,9 +63,11 @@ if command -v whereis &>/dev/null; then for python in $python_interpreters; do pythons="${pythons} ${python##*/}" done unset python_interpreters pythons=$(echo $pythons | tr " " "\n" | sort -u | tr "\n" " ") else pythons=python fi complete -F _python_django_completion -o default $pythons unset pythons