django_bash_completion Error

2 views
Skip to first unread message

zvoase

unread,
Aug 11, 2008, 1:44:32 PM8/11/08
to Django developers
There seems to be a problem with the extras/django_bash_completion
file when it is sourced in a bashrc file. I've figured out that this
is due to its use of CRLF line endings, whereas bash only accepts LF
line endings. Could someone please patch this? All that needs to be
done is for dos2unix to be run on the file.

Regards,
Zack

zvoase

unread,
Aug 14, 2008, 10:36:04 AM8/14/08
to Django developers
This also causes problems with django-admin.py on UNIX. By the way, is
the whole Django codebase in CRLF format?
Yeah, anyway, these two files (probably a couple more, but these at
least) need to be converted to LF (as in '\n') format, instead of CRLF
(as in '\r\n').
Django-admin.py's problem is in the shebang line (#!/usr/bin/env
python). bash interprets it weirdly when there's a weird \r character
at the end of it.

Fredrik Lundh

unread,
Aug 14, 2008, 10:48:55 AM8/14/08
to django-d...@googlegroups.com
zvoase wrote:

> This also causes problems with django-admin.py on UNIX. By the way, is
> the whole Django codebase in CRLF format?
> Yeah, anyway, these two files (probably a couple more, but these at
> least) need to be converted to LF (as in '\n') format, instead of CRLF
> (as in '\r\n').
> Django-admin.py's problem is in the shebang line (#!/usr/bin/env
> python). bash interprets it weirdly when there's a weird \r character
> at the end of it.

The repository uses native line endings, so if you end up with CRLF on
Unix, it's your installation that's messed up:

$ svn proplist -v
http://code.djangoproject.com/svn/django/trunk/django/bin/django-admin.py
Properties on
'http://code.djangoproject.com/svn/django/trunk/django/bin/django-admin.py':
svn:executable : *
svn:eol-style : native

(the same applies to the extras/django_bash_completion file, from what I
can tell. the eol-style was set in december 2006 for the admin file,
and in march 2008 for the completion script).

</F>

Reply all
Reply to author
Forward
0 new messages