Message148360
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 |
|
Date |
User |
Action |
Args |
2011-11-25 21:03:39 | robodan | set | recipients:
+ robodan, niemeyer, eric.smith, eric.araujo |
2011-11-25 21:03:38 | robodan | link | issue1521950 messages |
2011-11-25 21:03:38 | robodan | create | |
|