summaryrefslogtreecommitdiff
path: root/dev-python/django/files/django-2.0.7-bashcomp.patch
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/django/files/django-2.0.7-bashcomp.patch
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/django/files/django-2.0.7-bashcomp.patch')
-rw-r--r--dev-python/django/files/django-2.0.7-bashcomp.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-python/django/files/django-2.0.7-bashcomp.patch b/dev-python/django/files/django-2.0.7-bashcomp.patch
new file mode 100644
index 000000000000..2d886fe6481c
--- /dev/null
+++ b/dev-python/django/files/django-2.0.7-bashcomp.patch
@@ -0,0 +1,41 @@
+--- a/extras/django_bash_completion
++++ b/extras/django_bash_completion
+@@ -37,37 +37,4 @@ _django_completion()
+ COMP_CWORD=$COMP_CWORD \
+ DJANGO_AUTO_COMPLETE=1 $1 ) )
+ }
+-complete -F _django_completion -o default django-admin.py manage.py django-admin
+-
+-_python_django_completion()
+-{
+- if [[ ${COMP_CWORD} -ge 2 ]]; then
+- local PYTHON_EXE=${COMP_WORDS[0]##*/}
+- echo $PYTHON_EXE | egrep "python([3-9]\.[0-9])?" >/dev/null 2>&1
+- if [[ $? == 0 ]]; then
+- 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}" \
+- COMP_CWORD=$(( COMP_CWORD-1 )) \
+- DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) )
+- fi
+- fi
+- fi
+-}
+-
+-# Support for multiple interpreters.
+-unset pythons
+-if command -v whereis &>/dev/null; then
+- python_interpreters=$(whereis python | cut -d " " -f 2-)
+- for python in $python_interpreters; do
+- [[ $python != *-config ]] && 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
++complete -F _django_completion -o default django-admin.py django-admin