Timothy Sample
fcf32d1cad
Setup documentation generation.
...
* Makefile.am (info_TEXINFOS, gash_TEXINFOS): New targets.
* guix.scm: Add 'texinfo' to build inputs.
* doc/gash.info: Delete file.
* .gitignore: Ignore generated documentation files.
2019-05-20 18:07:47 -04:00
Timothy Sample
6283a632ba
Fix test data filename.
...
* tests/for-done-subshell.stdout: Rename this...
* tests/11-for-done-subshell.stdout: ...to this.
2019-05-20 18:07:47 -04:00
Timothy Sample
2e51c3f9ab
Add missing tests to the Makefile.
...
* Makefile.am (FULL_TESTS): Add tests/05-assignment-backtick.sh,
tests/10-if-line.sh, tests/10-if-redirect.sh, and
tests/20-pipe-sed-cat.sh.
2019-05-20 18:07:47 -04:00
Timothy Sample
6383159503
Remove the bootstrap phase from the Guix package.
...
This phase has been part of the upstream build system for a while now.
* guix.scm: Remove bootstrap phase.
2019-05-20 18:07:47 -04:00
Timothy Sample
536319194f
Delete unused test data.
...
* tests/data/basename.sed,
tests/data/fooRbar,
tests/data/ro.tar: Delete files.
2019-05-20 18:07:47 -04:00
Timothy Sample
ea7266e8f1
Add missing '.PHONY' indicator to Makefile.
...
* Makefile.am (test-list): Mark as phony.
2019-05-20 18:07:32 -04:00
Timothy Sample
0f6eb40f44
Reorder Makefile and add section comments.
...
* Makefile.am: Reorder rules and add section header comments to
make the structure clear.
2019-05-20 01:18:54 -04:00
Timothy Sample
315815bbd6
Factor out and update the usual Guile rules.
...
* build-aux/guile-rules.am: New file.
* .gitignore: Do not ignore it.
* Makefile.am: Include it, remove the rules it replaces, update
changed variable names, and use appending for 'EXTRA_DIST' and
'CLEANFILES'.
2019-05-20 01:18:54 -04:00
Timothy Sample
7e3dd750b1
Remove 'foreign' Automake option.
...
* configure.ac (AM_INIT_AUTOMAKE): Remove 'foreign' option.
2019-05-20 01:18:54 -04:00
Timothy Sample
c2d647a04f
Add a NEWS file.
...
* NEWS: New file.
2019-05-20 01:18:54 -04:00
Timothy Sample
28093b843e
Clean up '.dir-locals.el'.
...
* .dir-locals.el: Change indentation, and make sure that tabs are used
when editing Makefiles.
2019-05-20 01:18:54 -04:00
Timothy Sample
7c1c3ad5c8
Setup ChangeLog generation.
...
Use the 'gitlog-to-changelog' script from Gnulib to generate a
ChangeLog from the Git commit log when creating the distribution
tarball.
* build-aux/gitlog-to-changelog: New file.
* .gitignore: Do not ignore it.
* Makefile.am (gen-ChangeLog): New target.
(dist-hook): Depend on it.
* ChangeLog: New file.
2019-05-20 01:18:54 -04:00
Timothy Sample
9f48cea00e
Use the standard GNU INSTALL file.
...
* INSTALL: Use text from the standard GNU INSTALL file.
2019-05-20 01:18:54 -04:00
Timothy Sample
5ffb3413de
Move 'pre-inst-env.in' to 'build-aux'.
...
* pre-inst-env.in: Move this...
* build-aux/pre-inst-env.in: ...here.
* configure.ac: Update reference.
* .gitignore: Do not ignore it, and remove a duplicate 'pre-inst-env'.
2019-05-20 01:18:54 -04:00
Timothy Sample
4b664dd050
Add a more robust check for 'guild'.
...
* configure.ac: Add a more robust check for 'guild'.
* build-aux/gitlab-ci.yml: Do not make a 'guild' symlink.
2019-05-20 01:18:54 -04:00
Timothy Sample
95ed6f409e
Update package metadata.
...
* configure.ac (AC_INIT): Update title, bug report address, and
tarball name.
2019-05-20 01:18:54 -04:00
Timothy Sample
b024fcaab7
Remove compression utility configuration.
...
* configure.ac: Do not look for bzip2, compress, gzip, or xz.
* gash/config.scm.in (exec-internal-compress): Delete function.
(%bzip2, %compress, %gzip, %xz): Delete variables.
2019-05-20 01:18:54 -04:00
Timothy Sample
55ba522d38
Delete test output files when cleaning.
...
* Makefile.am (CLEANFILES): Include the '.1' and '.2' output files
from the integration tests.
2019-05-20 01:18:54 -04:00
Timothy Sample
7ddcf2a81e
Clean up .gitignore.
...
* .gitignore: Remove old '/bin' entries; sort lines; and make things
absolute where that makes sense.
2019-05-20 01:18:54 -04:00
Timothy Sample
7b1a70002a
Update AUTHORS file.
...
* AUTHORS: Remove references to deleted files and add Jan as an
author.
2019-05-20 01:18:54 -04:00
Timothy Sample
c677ed85cc
Clean up module imports in 'gash.scm'.
...
* gash/gash.scm: Sort the '#:use-module' lines and remove a duplicate
'(gash environment)'.
2019-05-20 01:18:54 -04:00
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
e39abd1566
Stop 'make clean' from deleting tests.
...
* Makefile.am (CLEANFILES): Fix the string replacements so that useful
tests do not get deleted.
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
589b92e430
Remove unneeded files.
...
* HACKING,
TODO,
bin/builtin.in,
sh.bnf,
todo/*: Delete files.
2019-05-20 01:18:54 -04:00
Timothy Sample
df43ca7215
Add support for Guile 2.0.
...
* configure.ac (GUILE_PKG): Add 2.0.
* gash/textual-ports.scm: New file.
* Makefile.am: Add it.
* gash/lexer.scm, gash/parser.scm, gash/shell.scm: Use it in place of
'(ice-9 textual-ports)'.
* tests/unit/shell.scm: Use it in place of '(ice-9 textual-ports)';
replace '(ice-9 textual-ports)' with '(rnrs io ports)' in sub-scripts;
and add a shim for 'setvbuf'.
2019-05-20 01:18:54 -04:00
Timothy Sample
9af8bb2832
Remove 'setvbuf' in string port redirect test.
...
This was only relevant to an older implementation of redirects, and
does not make much sense for us now.
* tests/unit/shell.scm (Redirects here-document to standard input):
Remove call to 'setvbuf'.
2019-05-20 01:18:54 -04:00
Timothy Sample
5b236ceef3
Structure 'echo' like all the other built-ins.
...
* gash/built-ins/echo.scm (echo): Rename this...
(main): ...to this, and do not export it.
* gash/built-ins.scm: Reference the 'main' function of the 'echo'
module using '@@'.
2019-05-20 01:18:54 -04:00
Timothy Sample
10400ed2ad
Remove PEG modules and the PEG-based parser.
...
* gash/grammar.scm,
gash/peg.scm,
gash/peg/cache.scm,
gash/peg/codegen.scm,
gash/peg/simplify-tree.scm,
gash/peg/string-peg.scm,
gash/peg/using-parsers.scm: Delete files.
Makefile.am: Remove them.
2019-05-20 01:18:54 -04:00
Timothy Sample
0b73a0e70f
Remove 'gash.guix.scm'.
...
* gash.guix.scm: Delete file.
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
5b74c6426a
echo: Implement escapes.
...
* gash/built-ins/echo.scm (escape->control): New function.
(echo): Support '-e' and '-E' options even when clumped.
* Makefile.am (XFAIL_TESTS): Remove tests/20-pipe-sed.sh.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:18:48 -04:00
Jan Nieuwenhuizen
1cd6f963ea
Allow setting the status with a Boolean.
...
* gash/environment.scm (set-status!): Allow numerical or boolean input.
2019-05-20 01:18:48 -04:00
Jan Nieuwenhuizen
18aefdda18
tests: Add 100-test-false.sh.
...
* tests/100-test-false.sh: New file.
* Makefile.am (FULL_TESTS): Add it.
2019-05-20 01:18:48 -04:00
Jan Nieuwenhuizen
06099ddead
tests: Add 43-trap-subshell.sh.
...
* tests/43-trap-subshell.sh: New file.
* tests/43-trap-subshell.stdout: New file.
* Makefile.am (FULL_TESTS): Add tests/43-trap-subshell.sh.
2019-05-20 01:18:48 -04:00
Jan Nieuwenhuizen
bbb74ab958
Delete merge leftover.
...
* check.sh: Delete file.
2019-05-20 01:18:48 -04:00
Jan Nieuwenhuizen
7640a09382
Support redirects with empty commands.
...
* gash/eval.scm (exp->thunk): Return 'noop' if 'exp' is '#f'.
* tests/50-redirect-clobber.sh: New file.
* tests/50-redirect-clobber.stdout: New file.
* Makefile.am (FULL_TESTS): Add tests/50-redirect-clobber.sh.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:18:36 -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
Jan Nieuwenhuizen
13f43973f5
Do not export unset variables.
...
* gash/environment.scm (get-environ): Filter out unset variables.
* tests/42-sh-export-new.sh: New file.
* tests/42-sh-export-new.stdout: New file.
* Makefile.am (FULL_TESTS): Add tests/42-sh-export-new.sh.
(XFAIL_TESTS): Remove tests/42-export-new.sh and tests/42-sh-export.sh.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:18:22 -04:00
Jan Nieuwenhuizen
25597a4bec
set: Support clumped flags, e.g. set -eux.
...
* gash/built-ins/set.scm (main): Support clumped flags.
2019-05-20 01:18:22 -04:00
Timothy Sample
50473ac9d4
Add copyright sign to headers.
...
* gash/built-ins/*, gash/environment.scm, gash/eval.scm,
gash/lexer.scm, gash/parser.scm, gash/repl.scm, gash/word.scm,
tests/unit/*, tools/coverage.in: Add copyright sign to headers.
2019-05-20 01:18:22 -04:00
Jan Nieuwenhuizen
9f57723fb6
Make 'set -x' print commands.
...
* gash/shell.scm (sh:exec-let): Respect the 'xtrace' option.
2019-05-20 01:18:22 -04:00
Jan Nieuwenhuizen
05f3880419
Remove accidentally committed files.
...
* 07-variable-or-slash.stdout: Delete file.
* 70-slash-string-slash.stdout: Delete file.
2019-05-20 01:18:22 -04:00
Jan Nieuwenhuizen
2e4e078975
Fix some environment-dependent tests.
...
* gash/environment.scm (initial-variables): Add 'SHELL' and 'SHELLOPTS'.
* tests/100-cd.sh, tests/100-cd.stdout: Use '/tmp' instead of '/bin'.
* tests/50-redirect-in-out.sh, tests/50-redirect-space.sh,
tests/50-redirect.sh: Use '/tmp' and PID for temporary files.
* tests/50-redirect-sed.sh: Make sure 'DESTDIR' is unset and use
'/bin/GASH' in place of '/bin/gash'.
* tests/50-redirect-sed.stdout, tests/data/diff.scm: Use '/bin/GASH' in
place of '/bin/gash'.
* Makefile.am (FULL_TESTS): Add tests/50-redirect-sed.sh,
tests/50-redirect-space.sh, and tests/100-cd.sh; remove
tests/50-redirect-merge.sh.
(BROKEN_TESTS): Remove tests/10-if-redirect.sh,
tests/50-redirect-sed.sh, tests/50-redirect-space.sh, and
tests/100-cd.sh; add tests/50-redirect-merge.sh.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:18:07 -04:00
Jan Nieuwenhuizen
56610b0669
Add export test.
...
* tests/42-export-new.sh: New file.
* tests/42-export-new.stdout: New file.
* Makefile.am (FULL_TESTS, XFAIL_TESTS): Add 42-export-new.sh.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:17:57 -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
7fcfe66407
Add the 'command' built-in.
...
* geesh/built-ins/command.scm: New file.
* Makefile.am: Add it.
* geesh/built-ins.scm (*built-ins*): Add 'command'.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:17:30 -04:00
Jan Nieuwenhuizen
57e8e3bd64
Add the 'type' built-in.
...
* geesh/built-ins/type.scm: New file.
* Makefile.am: Add it.
* geesh/built-ins.scm (*built-ins*): Add 'type'.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:17:22 -04:00