Jan Nieuwenhuizen
353af765eb
cp: Support -f, --force.
2018-12-02 09:03:02 +01:00
Jan Nieuwenhuizen
0679cf9903
mv: Support -f, --force (by ignoring it).
2018-12-02 09:03:02 +01:00
Jan Nieuwenhuizen
73ecccef1e
fix 01-script-$@.
2018-12-02 09:03:02 +01:00
Jan Nieuwenhuizen
1f0a7674d9
fix 01-script-$#.
2018-12-02 09:03:02 +01:00
Jan Nieuwenhuizen
d5c94e75dd
parse [ .. ] into plain command. fixes 10-if-bracket-false, 100-bracket-file.
2018-12-02 06:56:17 +01:00
Jan Nieuwenhuizen
0a09ab114a
mv: New builtin.
...
* gash/commands/mv.scm: New file.
* gash/bournish-commands.scm: Use it.
* build-aux/build-guile.sh: Compile it.
* configure: Wrap it.
* .gitignore: Ignore it.
2018-11-30 12:38:24 +01:00
Jan Nieuwenhuizen
1162f37d19
test: 07-variable-or-empty.
2018-11-25 11:53:29 +01:00
Jan Nieuwenhuizen
7f6b88c43b
implement shift.
2018-11-25 08:46:10 +01:00
Jan Nieuwenhuizen
cb05054006
fix parsing of 07-variable-or-doublequete.sh.
2018-11-24 13:10:38 +01:00
Jan Nieuwenhuizen
9ac8140cf4
test: 07-variable-or-doublequete.sh: New failing parse test.
2018-11-24 12:57:07 +01:00
Jan Nieuwenhuizen
b2f5004eb6
01-script-$0.sh, 01-script-$@.sh: add test and fix.
2018-11-24 12:25:24 +01:00
Jan Nieuwenhuizen
f81b526bd0
fix and test cd builtin.
2018-11-24 11:32:33 +01:00
Jan Nieuwenhuizen
58d1627b08
fix 60-function.sh.
2018-11-24 11:12:44 +01:00
Jan Nieuwenhuizen
43f79811aa
fix 07-variable-or-variable.sh.
2018-11-24 10:55:24 +01:00
Jan Nieuwenhuizen
bdbc29e448
transform: reduce simple commands...WIP
2018-11-17 20:08:17 +01:00
Jan Nieuwenhuizen
74454c2156
transform: handle ./source.
2018-11-17 19:27:51 +01:00
Jan Nieuwenhuizen
9d1ed9ef57
transform: if-clause->if.
2018-11-17 19:27:51 +01:00
Jan Nieuwenhuizen
df73d5421f
transform: translate script to begin or command.
2018-11-17 08:46:39 +01:00
Jan Nieuwenhuizen
b89ca17134
transform: rewrite io-redirection.
2018-11-17 08:42:54 +01:00
Jan Nieuwenhuizen
2dc0a56ff9
guix: replace recipe with guile-only (bootstrappable) build.
2018-11-16 08:03:58 +01:00
Rutger van Beusekom
d36ee815df
variable-regex: fix 70-*.sh
2018-11-16 00:24:17 +01:00
Jan Nieuwenhuizen
df605a161a
sed: Support substitution of \t, \n.
2018-11-14 22:58:32 +01:00
Jan Nieuwenhuizen
303746a4bc
io-here.
2018-11-14 22:49:06 +01:00
Jan Nieuwenhuizen
b6340bd612
io-redirect: some progress, some new tests.
2018-11-14 22:41:24 +01:00
Jan Nieuwenhuizen
049c4a20dc
cat: Oops, two fixes.
2018-11-14 22:40:52 +01:00
Jan Nieuwenhuizen
efd22ab959
fix 11-for.sh.
2018-11-14 21:09:21 +01:00
Rutger van Beusekom
bb79378e66
fix 10-if-else.sh and 10-if-elif.sh
2018-11-14 19:59:18 +01:00
Rutger van Beusekom
1fe85e2b8f
fix 10-if-word-variable.sh (HACK)
2018-11-14 19:50:43 +01:00
Rutger van Beusekom
c20ac38ace
fix 08-variable-not-and.sh
2018-11-14 19:46:02 +01:00
Rutger van Beusekom
03dcfb9a9f
fix 08-variable-and.sh
2018-11-14 19:40:46 +01:00
Rutger van Beusekom
aa8aa10151
fix 05-assignment-doublequoted-doubleqoutes.sh
2018-11-14 19:31:29 +01:00
Rutger van Beusekom
da105e0e81
fix 05-assignment-empty.sh
2018-11-14 19:31:00 +01:00
Rutger van Beusekom
6e88ad23d0
place assignment at the proper grammar level
2018-11-14 08:22:12 +01:00
Rutger van Beusekom
98868392c8
cleanup commented out code
2018-11-14 08:22:00 +01:00
Rutger van Beusekom
d667922bbd
narrow escape
2018-11-13 09:04:56 +01:00
Rutger van Beusekom
983b9b355a
pass make check-parse
2018-11-13 08:42:55 +01:00
Jan Nieuwenhuizen
b68f8c3223
connect backend: WIP
2018-11-12 10:23:01 +01:00
Jan Nieuwenhuizen
f6a9bb4109
grammar: strip all keywords.
2018-11-12 10:22:52 +01:00
Jan Nieuwenhuizen
0ee86aa981
grammar: move variable-and, or, regex to variable toplevel.
2018-11-12 10:22:52 +01:00
Jan Nieuwenhuizen
b28798b034
grammar: space: allow newline twice.
2018-11-12 10:22:52 +01:00
Jan Nieuwenhuizen
b9b6da52b6
grammar: literal: add \<unalias>. mag dat?
2018-11-12 10:22:52 +01:00
Jan Nieuwenhuizen
7483b27f55
Move peg into gash/, compile.
2018-11-12 10:22:40 +01:00
Rutger van Beusekom
2334e6ebde
revamp PEG grammar
2018-11-11 20:13:07 +01:00
Jan Nieuwenhuizen
5f2bcb9528
test: add failing 07-variable-or-slash.sh.
2018-11-10 11:55:50 +01:00
Jan Nieuwenhuizen
2ea6d6ce34
WIP: parse mes configure.sh
2018-11-10 11:45:01 +01:00
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
1e51c5cbd1
basename: New builtin.
...
* gash/commands/basename.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (basename-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:46:25 +01:00
Jan Nieuwenhuizen
f014281c29
dirname: New builtin.
...
* gash/commands/dirname.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (dirname-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:46:25 +01:00
Jan Nieuwenhuizen
e8b56af461
pipeline: Fix stray outputs.
...
* gash/pipe.scm (pipeline+): Do not add extra newlines, flush.
2018-11-05 20:16:39 +01:00
Jan Nieuwenhuizen
8f87f7dffa
Support io-here.
2018-11-05 20:16:39 +01:00
Jan Nieuwenhuizen
8d0d50240b
Support functions.
2018-11-05 20:16:39 +01:00
Jan Nieuwenhuizen
a8a6ea06df
compress WIP
2018-11-05 20:16:39 +01:00
Jan Nieuwenhuizen
9cf3ee9e7e
WIP > redir
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
f2fb1bedc9
tar: Cater for Guix bootstrap-guile's UTF-8 default.
...
* gash/ustar.scm (read-ustar-file): Cater for Guix bootstrap-guile's
UTF-8 default.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
478d75bba7
touch: New builtin.
...
* gash/commands/touch.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (touch-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
78989bfb90
Fix command tracing.
...
* gash/builtins.scm (term->string): New function.
(trace): Use it to make nicer traces; typo: alway display trace.
2018-11-05 20:13:26 +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
45479fc651
rmdir: New builtin.
...
* gash/commands/rmdir.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (rmdir-command): New variable.
(%bournish-commands): Add it.
* gash/shell-utils.scm (rmdir-p): New function.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
f62e6e99a7
mkdir: New builtin.
...
* gash/commands/mkdir.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (mkdir-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
678e192b4f
chmod: Move permission code to shell-utils.
...
* gash/shell-utils.scm (<chmodifier>): New record, move from commands/chmod.
(parse-modifier, parse-modifiers, make-numeric-chmodifier,
apply-chmodifiers): New function, move from commands/chmod.
* gash/commands/chmod.scm (chmod): Remove them.
* gash/util.scm (char->string, string->string-list): New function.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
6e396759a3
reboot: Use reboot'.
...
* gash/commands/reboot.scm (reboot'): Rename from reboot. Update
users.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
8bcc6d3c82
tar: Extract fix.
...
* gash/ustar.scm (read-ustar-file): Use binary output port.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
63f2d4b5f8
tar: Support symlinks.
...
* gash/ustar.scm (read-ustar-file): Support symlinks.
* gash/shell-utils.scm (display-file): Display them.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
005061d712
tar: Support -C.
...
* gash/commands/tar.scm (tar): Support -C.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen
d13de88e43
tar: Support --strip-components.
...
* gash/commands/tar.scm (tar): Support --strip-components.
* gash/ustar.scm (list-ustar-archive, list-ustar-port,
read-ustar-archive, read-ustar-port, read-ustar-file): Likewise.
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
a0ff0853ff
set: Support -u, clumped singles.
...
* gash/builtins.scm (set-command): Support -u, clumped singles.
* gash/environment.scm (variable): Consider `nounset'. TODO:
propagate error.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
ac30e252bd
Make dependency on geesh optional.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
992e12444d
chmod: New builtin.
...
* gash/commands/chmod.scm: New file.
* build-aux/build-guile.sh: Compile it.
* .gitignore: Ignore it.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
6175b07c7e
pipe: Connect stderr too.
...
* gash/pipe.scm (spawn): Connect stderr too.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
aafbc96dbd
rm: Resurrect.
...
* gash/commands/rm.scm: Resurrect.
* gash/bournish-commands.scm: Add it.
* build-aux/build-guile.sh: Compile it.
* .gitignore: Ignore it.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
6224bbeefc
test: tar.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen
ab4ce3b995
test: Add check-geesh.
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
1f9480cda1
Guile As SHell.
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
b433052b4a
builtins: Split out into gash/commands/.
...
* gash/commands/cat.scm: New file, expand from bournish-commands.scm.
* gash/commands/compress.scm: Likewise.
* gash/commands/cp.scm: Likewise.
* gash/commands/find.scm: Likewise.
* gash/commands/grep.scm: Likewise.
* gash/commands/ls.scm: Likewise.
* gash/commands/reboot.scm: Likewise.
* gash/commands/tar.scm: Likewise.
* gash/commands/wc.scm: Likewise.
* gash/commands/which.scm: Likewise.
* build-aux/pre-inst-env.in: New file.
* configure: Expand it.
* gash/bournish-commands.scm: Remove.
* gash/shell-utils.scm: Rename from guix-build-utils.scm.
2018-11-03 08:02:49 +01:00
Jan Nieuwenhuizen
1e5389f01d
builtins: Oops, have \NAME run builtin.
...
* gash/script.scm (command): Oops have \NAME run builtin.
(pipeline): Filter-out #<unspecified> (xtrace residue).
2018-10-30 17:39:05 +01:00
Jan Nieuwenhuizen
3e8b021f0b
bournish: Do not display help if --version is requested.
...
* gash/bournish-commands.scm (ls-command-implementation): Do not
display help if --version is requested.
(find-command-implementation): Likewise.
(grep-command): Likewise.
(tar-command): Likewise.
(compress-command): Likewise.
2018-10-29 22:55:05 +01:00
Jan Nieuwenhuizen
5296fdbf2c
tar: Use latin-1 (binary) codec instead of utf8.
2018-10-29 22:55:05 +01:00
Jan Nieuwenhuizen
b463aa32bc
tar: Handle extracting of directories.
...
* gash/ustar.scm (read-ustar-file): Do not dump content of directory.
Size is 0; do not start by reading 512 bytes.
2018-10-29 22:55:05 +01:00
Jan Nieuwenhuizen
1fd796bad7
guix: build fixes.
...
* bin/builtin.in: Remove gratuitous quotes.
* configure (BUILTINS): Add bash and sh scripts.
* gash/builtins.scm (command-command): Add missing format parameter.
(type-command): Likewise.
* gash/guix-build-utils.scm: Use (ice-9 format).
* gash/guix-utils.scm: Likewise.
* gash/ustar.scm (write-ustar-port): Remove catch.
(read-ustar-port): Likewise.
2018-10-29 22:09:34 +01:00
Jan Nieuwenhuizen
f7c1dd6e72
Make readline optional.
...
* gash/readline.scm: New file.
* build-aux/build-guile.sh: Compile it.
* gash/gash.scm: Use it as fallback.
2018-10-29 21:22:32 +01:00
Jan Nieuwenhuizen
d2133b8502
tar: Support old cvf/xvf and auto-compress.
...
* gash/bournish-commands.scm (tar-command): Support old cvf/xvf and
auto compress (use archive suffix to determine the compression.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
a10247aab1
tar: Support compression.
...
* gash/guix-utils.scm: New file, partial import from Guix.
Throughout: Add `compress.'
* build-aux/build-guile.sh: Compile it.
* gash/config.scm.in: Support it by defining compressors.
* configure: Substitute them.
* gash/bournish-commands.scm (tar-command): Use it to have tar support
compression and decompression.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
e3e20738c2
tar: Handle stdin, stdout.
...
* gash/ustar.scm (list-ustar-port, extract-ustar-port,
write-ustar-port): New function.
* gash/bournish-commands.scm (tar-command): Use them.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
8b56dcc2ab
compress: play nice with GNU tar.
...
* gash/bournish-commands.scm (compress-command): Compress/decompress
from stdin if not tty.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
975f53d98e
bournish: Add compress, from Guile100 challenge by Daniel Hartwig. WIP
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
8aad645152
ls: Support -l.
...
* gash/bournish-commands.scm (ls-command-implementation): Support -l.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
4e671558e5
tar: Nicer verbose listing of files.
...
* gash/guix-build-utils.scm (display-file): New function.
* gash/ustar.scm (display-header): Use it.
(ustar-header->stat): New function.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
28d62b6169
tar: Support --list and --verbose.
...
* gash/ustar.scm (extract-ustar-file): Add keyword argument: extract?
(extract-ustar-archive): Add keyword arguments: extract?, verbose?:
(display-rwx, display-header, list-ustar-archive): New function
* gash/bournish-commands.scm (tar-command): Support --list, --verbose.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
463b71acc9
tar: Support creation of deterministic archives.
...
* gash/ustar.scm (write-ustar-header, write-ustar-file): Accept
keyword arguments: group mtime numeric-owner? owner.
(create-ustar-archive): Likewise. Rename from write-ustar-archive.
* gash/bournish-commands.scm (tar-command): Support --group, --mtime,
--numeric-owner, --owner and --sort.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
92d2896134
tar: Support extraction.
...
* gash/ustar.scm (extract-ustar-file):
* gash/ustar.scm (<ustar-header>): New record type.
(bv->ustar-string, bv->ustar-number, bv->ustar-0string,
sub-bytevector, read-ustar-header, extract-ustar-file): New function.
Implement extraction.
2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen
03fc5c928a
Add mkdir-p.
...
* gash/guix-build-utils.scm (mkdir-p): New function, import from Guix.
2018-10-27 11:31:22 +02:00
Jan Nieuwenhuizen
3c57272971
Add delete-file-recursively.
...
* gash/guix-build-utils.scm (delete-file-recursively): New function,
import from Guix.
2018-10-27 11:31:22 +02:00
Jan Nieuwenhuizen
70d28ea480
Make tar a bournish-command.
...
* bin/gash.in: Make Scheme script.
* bin/tar.in: Likewise.
* gash/bournish-commands (tar-command): New command, move from
tar.scm.
(%bournish-commands): Add it.
* gash/tar.scm: Remove.
2018-10-27 11:31:22 +02:00
Jan Nieuwenhuizen
b8b170530c
bournish: Add tar, from Guile100 challenge by Mark Weaver.
...
See https://github.com/spk121/guile100
* bin/tar.in: New file.
* configure: Produce bin/tar.
* .gitignore: Ignore it.
* makefile (bin/tar): New target.
* gash/tar.scm: New file.
* gash/ustar.scm: New file.
* build-aux/build-guile.sh: Compile new files.
2018-10-27 11:30:45 +02:00
Jan Nieuwenhuizen
019464acf6
fix: set -e.
2018-10-21 16:13:29 +02: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
9462aaa163
checkpoint
2018-07-16 07:50:28 +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
24c35cc5d9
checkpoint
2018-07-15 21:44:15 +02:00
Jan Nieuwenhuizen
cbd13fdc88
checkpoint
2018-07-15 20:49:52 +02:00
Jan Nieuwenhuizen
e7bfd347fa
checkpoint
2018-07-15 20:47:09 +02:00
Jan Nieuwenhuizen
83f20d1ff8
flatten-fu
2018-07-15 20:06:19 +02:00
Jan Nieuwenhuizen
e9a57a899c
more for-progress
2018-07-15 18:39:17 +02:00
Jan Nieuwenhuizen
bfc39b1a18
test: implement -n, -z, !=.
2018-07-15 18:19:56 +02:00
Jan Nieuwenhuizen
8f8ba68c54
resurrect set -x
2018-07-15 18:18:34 +02:00
Jan Nieuwenhuizen
85b90e8537
job: disable backgrounding
2018-07-15 16:32:43 +02:00
Jan Nieuwenhuizen
e6e03c6da2
parser: handle substitution in for sequence.
2018-07-15 16:08:26 +02:00
Jan Nieuwenhuizen
c32034d13d
command, builtin, glob, echo cleanup and fixes
2018-07-15 13:43:52 +02:00
Jan Nieuwenhuizen
d065723221
parser: refactor, use `pipeline' instead of `expression'.
2018-07-15 12:49:59 +02:00
Jan Nieuwenhuizen
9623e014f0
builtins: [: New command.
...
* gash/builtins (bracket-command): New function.
(%builtin-commands): Add it.
2018-07-15 12:23:27 +02:00
Jan Nieuwenhuizen
4bb60cc4c3
parse: handle empty script WIP
2018-07-14 23:16:27 +02:00
Jan Nieuwenhuizen
b20306e123
builtins: grep: New command.
...
* gash/guix-build-utils.scm (<grep-match>): New record type.
(grep): New function.
* gash/builtins.scm (grep-command): New command.
(%builtin-commands): Add it.
2018-07-14 23:16:27 +02:00
Jan Nieuwenhuizen
0cab9321b2
builtins: test: Enhance with file tests.
...
* gash/guix-build-utils.scm (directory-exists?, executable-file?,
symbolic-link?): Import from Guix.
* gash/builtins.scm (test-command): Use them to enhance with file test.
2018-07-14 23:16:27 +02:00
Jan Nieuwenhuizen
863b3b5908
builtins: test: New command.
...
* gash/builtins.scm (test-command): New command.
(%builtin-commands): Add it.
(builtin, command, doublequotes, expression, for, glob,
singlequotes, substitution): Move from peg.scm.
* gash/peg.scm: Remove them.
2018-07-14 23:16:13 +02:00
Jan Nieuwenhuizen
48373edb3f
WIP: IF hack
2018-07-14 22:48:55 +02:00
Jan Nieuwenhuizen
de6d653c7c
builtins: type: New command.
...
* gash/builtins.scm (type-command): New function.
(%builtin-commands): Add it.
2018-07-14 22:48:55 +02:00
Jan Nieuwenhuizen
677deaf9b3
builtins: command: New command.
...
* gash/builtins.scm (command-command): New command.
(%builtin-commands): Add it.
(builtin): Move from peg.
* gash/peg.scm (builtin): Remove.
2018-07-14 22:48:42 +02:00
Jan Nieuwenhuizen
0408463a13
bah, some uninformed error handling. WIP
2018-07-14 22:48:42 +02:00
Jan Nieuwenhuizen
870fc792d7
debug du WIP
2018-07-14 22:48:42 +02:00
Jan Nieuwenhuizen
2c30f3c4c6
builtins: find: First naive implementation.
...
* gash/builtins.scm (find-command-implementation): New function.
(find-command): New command.
(%builtin-commands): Add it.
* gash/guix-build-utils.scm (file-name-predicate, find-files): Import
from Guix.
2018-07-14 22:48:42 +02:00
Jan Nieuwenhuizen
e0169d0acd
builtins: Support \non-builtin escape.
...
* gash/peg.scm (builtin): Add #:prefer-builtin? keyword argument.
(transform): Support \non-builtin escape.
2018-07-14 15:57:02 +02:00
Jan Nieuwenhuizen
e5c6324d82
remove debugging WIP:
2018-07-14 15:56:46 +02:00
Jan Nieuwenhuizen
43d418fab1
some builtin progress WIP
2018-07-14 15:41:03 +02:00
Jan Nieuwenhuizen
97a95ee002
builtins: cd: Support `cd -'.
...
* gash/builtins.scm (cd-command): Support `cd -'.
2018-07-14 15:23:52 +02:00
Jan Nieuwenhuizen
56a36baee5
factor-out environment.
...
* gash/environment.scm: New file.
* build-aux/build-guile.sh (SCM_FILES): Add it.
* gash/peg.scm: Include it.
(assignment, %global-variables, set-shell-opt!, variable): Remove.
2018-07-14 15:23:52 +02:00
Jan Nieuwenhuizen
23a13b0890
builtins: resurrect pwd WIP
2018-07-14 15:23:52 +02:00
Jan Nieuwenhuizen
3ea368ab2f
resurrect help WIP
2018-07-14 15:23:52 +02:00
Jan Nieuwenhuizen
40aa82fca9
builtins: ls: Support -a,--all,-1,--one-file-per-line,-h,--version.
...
* gash/bournish-commands.scm (ls-command-implementation): Support
-a,--all,-1,--one-file-per-line,-h,--version.
2018-07-14 15:23:21 +02:00
Jan Nieuwenhuizen
512b848b11
build: Add config.scm.in.
...
* gash/config.scm.in:
* configure: Use it to generate gash/config.scm
* .gitignore: Ignore generated file.
* gash/gash.scm (display-version): Use it.
* build-aux/build-guile.sh: Compile it.
2018-07-14 15:10:44 +02:00
Jan Nieuwenhuizen
c896015068
resurrect builtins: WIP
2018-07-14 13:34:10 +02:00
Rutger van Beusekom
f5339a09f5
WIP: marginal
2018-07-14 12:34:42 +02:00
Jan Nieuwenhuizen
4d3751f654
resurrect builtins: WIP
2018-07-14 12:24:51 +02:00
Jan Nieuwenhuizen
f3c8c2c7f0
exit-stati: WIP
2018-07-14 10:20:05 +02:00
Jan Nieuwenhuizen
42fbcb942a
fix exit-status in `command'
2018-07-14 09:46:30 +02:00
Jan Nieuwenhuizen
ff985aa083
verder aangehaakt
2018-07-14 09:34:57 +02:00
Jan Nieuwenhuizen
20196ccaf0
further WIP: resurrect interactive mode
2018-07-14 09:08:20 +02:00
Jan Nieuwenhuizen
1174445a08
more merge fu
2018-07-14 08:51:12 +02:00
Jan Nieuwenhuizen
f98637b8aa
oops, merge fix
2018-07-14 08:29:51 +02:00
Rutger van Beusekom
7054858d9a
checkpoint
2018-07-13 22:54:22 +02:00
Rutger van Beusekom
d5e7cb691d
checkpoint
2018-07-13 22:54:22 +02:00
Rutger van Beusekom
745757cfd0
WIP FOO => rewrite me harder
2018-07-13 22:54:22 +02:00