Commit Graph

31 Commits

Author SHA1 Message Date
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
Jan Nieuwenhuizen 13cb50af60 gash: resurrect. 2018-10-21 15:24:24 +02:00
Jan Nieuwenhuizen 0f5b538c3a geesh: initial integration.
GUILE_LOAD_PATH=$HOME/src/geesh:$GUILE_LOAD_PATH
    GUILE_LOAD_COMPILED_PATH=$HOME/src/geesh:$GUILE_LOAD_COMPILED_PATH

    bin/gash --parse -c 'echo boo | sed s,o,O, | grep .'
    bin/gash --geesh --parse -c 'echo boo | sed s,o,O, | grep .'
2018-10-21 12:45:51 +02:00
Jan Nieuwenhuizen 292fbc5ecb test/if.sh, test/if2.sh -- weird 2018-07-15 23:27:58 +02:00
Jan Nieuwenhuizen 6468b04791 refactor WORD...bummer: word-for-test-assign-sh word-for-test-if-sh 2018-07-15 23:01:52 +02:00
Jan Nieuwenhuizen 1f5c82ecae word! test/if.sh, test/assign.sh 2018-07-15 21:35:42 +02:00
Jan Nieuwenhuizen 83f20d1ff8 flatten-fu 2018-07-15 20:06:19 +02:00
Rutger van Beusekom f5339a09f5 WIP: marginal 2018-07-14 12:34:42 +02:00
Jan Nieuwenhuizen 9f8daa3d3c guix: resurrect package build. 2018-07-10 00:11:24 +02:00
Jan Nieuwenhuizen 0bc6de34d1 bugfix: test/22-semi-pipe-exit-0.sh 2018-07-04 19:17:52 +02:00
Jan Nieuwenhuizen 795b059373 Add -e, -x options. Use -x for running tests. 2018-07-04 06:58:01 +02:00
Jan Nieuwenhuizen 503be95f97 test: Updates. 2018-07-03 22:18:05 +02:00
Rutger van Beusekom f171f79ec9 substitution 2017-12-07 23:07:31 +01:00
Rutger van Beusekom 6e556508f5 checkpoint 2017-12-07 23:07:31 +01:00
Rutger van Beusekom e31829a757 substitution 2017-12-07 23:07:31 +01:00
Rutger van Beusekom e348606d36 testing 2017-12-07 23:07:31 +01:00
Rutger van Beusekom 57b93d2902 substitution WIP 2017-12-07 23:07:31 +01:00
Rutger van Beusekom 1b31587c9b checkpoint 2017-12-07 23:07:29 +01:00
Rutger van Beusekom 3431779da2 split tests 2017-12-07 23:07:29 +01:00
Rutger van Beusekom 12d7976dfd implement globbing lazily such that (eval (save (transform (parse shell)))) is maintained. 2017-12-07 23:07:28 +01:00
Rutger van Beusekom a5c35947a9 ifthen WIP 2017-12-07 23:07:28 +01:00
Rutger van Beusekom 8b1a499d74 nesting delimited 2017-12-07 23:07:28 +01:00
Rutger van Beusekom fcfabb096d tests 2017-12-07 23:07:28 +01:00