Permalink
Please sign in to comment.
Browse files
Implement and integrate a new algorithm for word splitting.
- It fixes many tests in word-split.test.sh.
- Add unit tests for many corner cases.
- It exposes a fundamental problem with the part_value representation.
Tests like argv ${x:-"1 2" "3 4"} are now failing. These will be
fixed by a new representation.
- It's not yet integrated with the 'read' builtin, but will be shortly.
The new algorithm is an explicit state machine, and the output is an
array of spans.
There is also a simpler WhitespaceSpitter for the common case. A new
RootSplitter() abstraction manages these splitter instances, as IFS
is scoped.- Loading branch information...
Showing
with
544 additions
and 106 deletions.
- +3 −1 bin/oil.py
- +14 −15 core/builtin.py
- +5 −2 core/cmd_exec.py
- +3 −1 core/cmd_exec_test.py
- +3 −1 core/completion_test.py
- +356 −12 core/legacy.py
- +92 −52 core/legacy_test.py
- +2 −1 core/state.py
- +54 −21 core/word_eval.py
- +12 −0 spec/word-split.test.sh
Oops, something went wrong.
0 comments on commit
7192efd