Permalink
Please sign in to comment.
Browse files
Implement Patsub ${x/pat/replace} and strip ops ${x#prefix}, etc.
There are two strategies, depending on the pattern. 1) Fixed strings use Python's string methods, e.g. startswith/endswith/replace/slice. 2) Glob patterns are converted to Python regexes. (Character classes aren't currently supported.) Then we use the regex engine for position information and greedy/non-greedy matches. Also: - Added tests. - Fix parsing. - TODO: Unicode Addresses issue #26.
- Loading branch information...
Showing
with
241 additions
and 133 deletions.
- +62 −28 core/glob_.py
- +27 −7 core/glob_test.py
- +116 −81 core/word_eval.py
- +17 −13 osh/word_parse.py
- +2 −2 osh/word_parse_test.py
- +15 −0 spec/var-op-other.test.sh
- +2 −2 test/spec.sh
Oops, something went wrong.
0 comments on commit
8066fd7