diff --git a/gash/gash.scm b/gash/gash.scm index cde0ccb..b2101c8 100644 --- a/gash/gash.scm +++ b/gash/gash.scm @@ -179,6 +179,7 @@ the GNU Public License, see COPYING for the copyleft. (('script term "&") (list (background (transform term)))) (('script term) `(,(transform term))) (('script terms ...) (transform terms)) + (('substitution "$(" (script) ")") (stderr "FOO: " (transform script)) (transform script)) ((('term command)) `(,(transform command))) ((('term command) ...) (map transform command)) ((('term command) (('term commands) ...)) (map transform (cons command commands))) diff --git a/gash/peg.scm b/gash/peg.scm index 591fb1f..5e77307 100644 --- a/gash/peg.scm +++ b/gash/peg.scm @@ -37,8 +37,7 @@ (define-peg-pattern here-document all (and (+ (and (not-followed-by here-delim) peg-any)) here-delim)) (define-peg-string-patterns - "script <-- ws* (term (separator term)* separator?)? eof - eof < !. / error + "script <-- ws* (term (separator term)* separator?)? error <-- .* term <-- pipeline (sp* ('&&' / '||') ws* pipeline)* pipeline <-- '!'? sp* command (sp* pipe ws* command)* diff --git a/test/substitution b/test/substitution deleted file mode 100644 index 5c1f26d..0000000 --- a/test/substitution +++ /dev/null @@ -1 +0,0 @@ -echo "$(ls)" diff --git a/todo/substitution b/todo/substitution new file mode 100644 index 0000000..9c3f223 --- /dev/null +++ b/todo/substitution @@ -0,0 +1 @@ +echo $(find test -type f)