diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2008-03-13 06:14:26 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2008-03-13 06:14:26 +0000 |
| commit | bfc5660c472ac2e52cc4fdec78315c87b01357de (patch) | |
| tree | 887c25472201f310cc5b95cb236cf5492af9bf57 /extras/django_bash_completion | |
| parent | 304642769c5e0e704d0204bc241574c8c491cdf5 (diff) | |
newforms-admin: Merged from trunk up to [7232]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'extras/django_bash_completion')
| -rw-r--r-- | extras/django_bash_completion | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/django_bash_completion b/extras/django_bash_completion index 8906609a68..7b2b1947d8 100644 --- a/extras/django_bash_completion +++ b/extras/django_bash_completion @@ -61,13 +61,13 @@ _django_completion() || # 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 @@ unset pythons 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 |
