Timothy Sample
315322e6ca
Remove 'debug' and 'prefer-builtins' options.
...
These were not working anyway.
* gash/gash.scm (%debug-level, %prefer-builtins): Remove variables.
(display-help, main): Remove 'debug' and 'prefer-builtins'.
2019-05-20 01:18:54 -04:00
Timothy Sample
ff34039b62
Remove unused modules.
...
* gash/builtins.scm,
gash/io.scm,
gash/job.scm,
gash/pipe.scm,
gash/script.scm,
gash/shell-utils.scm,
gash/util.scm: Delete files.
* Makefile.am: Remove them.
* gash/gash.scm (main, prompt): Remove calls to deleted job control
procedures.
2019-05-20 01:18:54 -04:00
Timothy Sample
874d165b11
Remove the unused 'geesh' module.
...
* gash/geesh.scm: Delete file.
* Makefile.am: Do not compile it.
* gash/gash.scm (%geesh-parser?): Remove unused variable.
(parse, parse-string, file-to-ast): Remove unused procedures.
2019-05-20 01:18:54 -04:00
Jan Nieuwenhuizen
6808c941f1
Respect '--parse' flag for files and non-TTY inputs.
...
* gash/gash.scm (main): Include 'parse?' in all calls to 'run-repl'.
2019-05-20 01:18:36 -04:00
Timothy Sample
e87f351f3e
Add missing copyright headers.
...
* gash/gash.scm, gash/grammar.scm, gash/io.scm, gash/job.scm,
gash/pipe.scm, gash/script.scm: Add missing copyright header.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-05-20 01:17:48 -04:00
Timothy Sample
1bd92e2893
Remove (almost) all references to Geesh.
...
gash/environment.scm: Remove file.
geesh/*: Move these files into the 'gash' folder and replace all
instances of the word 'geesh'.
scripts/geesh.in: Remove file.
HACKING, INSTALL, Makefile.am, configure.ac, guix.scm,
tests/bootstrap/bash-without-bash.scm, tests/spec/Makefile.am,
tests/spec/check-spec, tests/spec/oil.scm, tests/unit/*,
tools/coverage.in: Replace all instances of the word 'geesh'.
Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2019-05-20 01:17:40 -04:00
Timothy Sample
f387269c0b
Only use readline for TTYs.
...
* gash/gash.scm: Hide the readline interface behind a check for
'isatty?', and default to just running the plain REPL.
2019-05-20 01:17:40 -04:00
Jan Nieuwenhuizen
cf5611f6d4
Replace geesh script with gash.
...
* geesh/repl.scm (run-repl): Add optional parse? parameter.
* gash/gash.scm (main): Rewrite to use Geesh parser and evaluator.
* scripts/geesh.in: Remove.
* Makefile.am: Remove scripts/geesh; adjust XFAIL_TESTS.
* .gitignore: Update.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:17:14 -04:00
Timothy Sample
171796317f
Remove external commands.
...
* gash/bournish-commands.scm, gash/commands/*, gash/compress.scm,
gash/guix-utils.scm, gash/lzw.scm, gash/ustar.scm: Delete files.
* gash/builtins.scm, gash/gash.scm, gash/script.scm: Remove references
to deleted modules.
* tests/100-basename-*, tests/100-dirname-*, tests/100-sed-*,
tests/100-tar-*, tests/100-tr-*: Delete files.
* Makefile.am: Remove deleted modules and tests.
2019-05-16 10:49:38 -04:00
Jan Nieuwenhuizen
b2f5004eb6
01-script-$0.sh, 01-script-$@.sh: add test and fix.
2018-11-24 12:25:24 +01:00
Rutger van Beusekom
2334e6ebde
revamp PEG grammar
2018-11-11 20:13:07 +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
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
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
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
83f20d1ff8
flatten-fu
2018-07-15 20:06:19 +02:00
Jan Nieuwenhuizen
c32034d13d
command, builtin, glob, echo cleanup and fixes
2018-07-15 13:43: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
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
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
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
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
Jan Nieuwenhuizen
6aa17dd4ac
cat: Support multiple arguments, support "-"
...
* gash/bournish-commands.scm (cat-implementation): Support multiple
arguments, support "-".
(wrap-command): New function.
2018-07-05 06:17:34 +02:00
Jan Nieuwenhuizen
b8e41cfa55
typos
2018-07-04 21:11:27 +02:00
Jan Nieuwenhuizen
8c441105fe
bournish: cp, rm: handle exit stati.
2018-07-04 21:04:36 +02:00
Jan Nieuwenhuizen
d920fe1b4a
oops: bugfix `cp' FIXUP: bournish commit.
2018-07-04 20:54:30 +02:00
Jan Nieuwenhuizen
f5ee21eb36
Update help and root prompt.
2018-07-04 20:35:28 +02:00
Jan Nieuwenhuizen
836f7627b2
Import bournish commands from GNU Guix.
...
* AUTHORS: New file.
* gash/bournish-commands.scm: New file. Imported and adapted from GNU
Guix.
* gash/bournish-commands.scm: Likewise.
* gash/gash.scm (%commands): Add commands from Bournish.
2018-07-04 20:03:11 +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
61ee206b8d
softcode --debug levels.
2018-07-03 21:07:21 +02:00
Jan Nieuwenhuizen
cda9eda403
implement set -x.
2018-07-03 20:56:03 +02:00
Jan Nieuwenhuizen
f047fd2d2a
exit: new builtin.
2018-07-03 20:56:03 +02:00
Jan Nieuwenhuizen
c4ea4457f9
implement set -e.
2018-07-03 20:56:03 +02:00
Jan Nieuwenhuizen
567170d226
variables: use string for key, value.
2018-07-03 20:20:04 +02:00
Jan Nieuwenhuizen
867d83bb69
gash -c COMMAND: exit status fix0r
2018-07-03 06:39:02 +02:00
Rutger van Beusekom
4ef3a941aa
WIP: status:exit-val
2018-07-02 20:05:50 +02:00
Rutger van Beusekom
054db72e94
WILDE PETS
2018-07-02 19:55:19 +02:00
Jan Nieuwenhuizen
462f8ce95f
handle exit stati WIP
2018-07-02 19:11:06 +02:00
Jan Nieuwenhuizen
d79936f561
Refactor builtin commands.
...
* gash/gash.scm (main): Handle --prefer-builtins.
(display-help): Mention it.
(bg-command, cd-command, echo-command, pwd-command, fg-command): New
functions.
(%commands): New variable.
(builtin): Use it.
2018-07-02 19:02:52 +02:00
Rutger van Beusekom
32f1d25170
add -c STRING
2018-07-02 08:35:10 +02:00
Jan Nieuwenhuizen
1b56f8cb2f
BUGS: New file. Fixed one.
2018-06-30 07:08:39 +02:00