Jan Nieuwenhuizen
9a96816b5d
Support elif.
2018-11-10 11:30:55 +01:00
Jan Nieuwenhuizen
90325b22a2
Support . script, source script.
2018-11-10 11:30:55 +01:00
Jan Nieuwenhuizen
726ca052a9
Support ${ / / }, ${ / }.
2018-11-10 11:30:55 +01:00
Jan Nieuwenhuizen
8ca428c7f2
Support ${ # ## % %% }.
2018-11-05 22:47:34 +01:00
Jan Nieuwenhuizen
8d0d50240b
Support functions.
2018-11-05 20:16:39 +01:00
Jan Nieuwenhuizen
6250b22951
Support && and ||.
...
* gash/script.scm (and-terms, or-terms): New macros.
* gash/peg.scm (transform): Transform to use them.
(parse-): Parse && and || as binary term operator.
* test/20-and.sh: Test it.
* test/20-or.sh: Test it.
* check.sh (tests): Run it.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
2a4e3ec71b
Support escaped newline.
...
* gash/peg.scm (parse-): Support escaped newline.
* test/01-script-backslash.sh: Test it.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
bca65e807b
Support ${foob-bar} and ${foo+bar}.
...
* gash/environment.scm (variable): Add default parameter.
(variable-or, variable-and): New function.
* test/07-variable-or.sh: Test it.
* test/07-variable-or-not.sh:
* test/08-variable-and.sh:
* test/08-variable-and-not.sh:
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
418652bee1
test: Refactor.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
6224bbeefc
test: tar.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
6203f8cf07
test: Update test suite.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
f27cb9a192
sed: New builtin.
...
* gash/commands/sed.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/shell-utils.scm (with-atomic-file-replacement,
substitute*): New function, Import from Guix.
(substitute-port): New function.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
9d1d2be6a6
test: Add expectations.
...
* check.sh: New file, from test.sh.
* test.sh: Run single test with expectations.
2018-11-03 08:02:49 +01:00