Author robodan
Recipients eric.araujo, eric.smith, niemeyer, robodan
Date 2011-11-25.21:03:38
SpamBayes Score 2.25764e-09
Marked as misclassified No
Message-id <CAEcGQ+OsquYfNGZuw-Piu0=nPFDARr7EJAk58DdDd94YsZMm1g@mail.gmail.com>
In-reply-to <CAEcGQ+POMTHT1PmJdRc4jF5bo=1z31kvu_08deY_8vD2sE25fw@mail.gmail.com>
Content
I just realized that I left out a major case.  The shell will also
split ().  I think this is now complete.  If you do "man bash" and
skip down to DEFINITONS it lists all the control characters.

I've attached updated versions of ref_shlex.py and test_shlex.diff.
They replace the previous ones.

-Dan

On Fri, Nov 25, 2011 at 12:25 PM, Dan Christian <report@bugs.python.org> wrote:
>
> Dan Christian <robodan@users.sourceforge.net> added the comment:
>
> I've attached a diff to test_shlex.py and a script that I used to
> verify what the shells actually do.
> Both are relative to Python-3.Lib/test
>
> I'm completely ignoring the quotes issue for now.  That should
> probably be an enhancement.  I don't think it really matters until the
> parsing issues are resolved.
>
> ref_shlex is python 2 syntax.  python -3 shows that it should convert cleanly.
> ./ref_shlex.py
> It will run by default against /bin/*sh
> If you don't want that, do something like: export SHELLS='/bin/sh,/bin/csh'
> It runs as a unittest.  So you will only see dots if all shells do
> what it expects.  Some shells are flaky (e.g. zsh, tcsh), so you may
> need to run it multiple times.
>
> Getting this into the mainline will be interesting.  I would think it
> would take some community discussion.  I may be able to convince
> people that the current behaviour is wrong, but I can't tell you what
> will break if it is "fixed".  And should the fix be the default?  As
> you mentioned, it depends on what people expect it to do and how it is
> currently being used.  I see the first step as presenting a clear case
> of how it should work.
>
> -Dan
Files
File name Uploaded
ref_shlex.py robodan, 2011-11-25.21:03:38
test_shlex.diff robodan, 2011-11-25.21:03:38
History
Date User Action Args
2011-11-25 21:03:39robodansetrecipients: + robodan, niemeyer, eric.smith, eric.araujo
2011-11-25 21:03:38robodanlinkissue1521950 messages
2011-11-25 21:03:38robodancreate