Commit Graph

6 Commits

Author SHA1 Message Date
Jan Nieuwenhuizen 6f81266e2b gash compat textual-ports: Add put-char.
* gash/compat/textual-ports.scm: Add put-char.
2019-12-09 13:57:15 -05:00
Timothy Sample 3d3375e066 Fix pathname expansion.
The old implementation had several bugs, prompting this complete
rewrite.

* gash/compat/srfi-43.scm (vector-empty?): New procedure.
* gash/pattern.scm (pattern-null?): New procedure.
* gash/word.scm (qword->pattern-string): New procedure.
(qword->pattern): Rewrite using 'qword->pattern-string'.
(find-files): New procedure.
(expand-pathnames): Rewrite using 'find-files' and add a docstring.
* tests/unit/word.scm: Add tests.
(mock): New syntax.
(make-pure-scandir): New procedure.
(with-mocked-files): New syntax.
2019-12-09 13:23:54 -05:00
Timothy Sample 7c8ddd7a43 Use a record type for patterns.
* gash/compat/srfi-43.scm: New file.
* Makefile.am: Add it.
* gash/pattern.scm (<pattern>): New record type.
(parse-part): New procedure.
(parse-pattern): Return a '<pattern>'.
(pattern-plain?, pattern-match?): Accept a '<pattern>'.
(string-starts-with-part, string-ends-with-part,
string-contains-part): Treat 'part' as a vector.
2019-11-24 17:13:54 -05:00
Timothy Sample 669c414116 Prefer 'if-guile-version-below' to 'cond-expand'.
* gash/compat.scm: Use 'if-guile-version-below' over 'cond-expand'.
* gash/compat/textual-ports.scm: Ditto.
2019-05-20 18:07:47 -04:00
Timothy Sample 0c57fc9ef9 Move 'textual-ports' under 'compat'.
* gash/textual-ports.scm: Move this...
* gash/compat/textual-ports.scm: ...here.
* Makefile.am, gash/lexer.scm, gash/parser.scm, gash/shell.scm,
tests/unit/shell.scm: Update references.
2019-05-20 18:07:47 -04:00
Timothy Sample 878b9c3dca Add support for Guile 2.0.9.
* gash/compat.scm: New file.
* gash/compat/hash-table.scm: New file.
* Makefile.am: Add them.
* .dir-locals.scm: Add indentation for 'if-guile-version-below'.
* guix.scm (guile-2.0.9): New variable.
* gash/built-ins/echo.scm (escape->control): Use '#\esc'.
* gash/environment.scm: Use '(gash compat hash-table)'.
* gash/built-ins/break.scm,
gash/built-ins/cd.scm,
gash/built-ins/command.scm,
gash/built-ins/continue.scm,
gash/built-ins/dot.scm,
gash/built-ins/exec.scm,
gash/built-ins/exit.scm,
gash/built-ins/pwd.scm,
gash/built-ins/return.scm,
gash/built-ins/set.scm,
gash/built-ins/shift.scm,
gash/built-ins/trap.scm,
gash/built-ins/type.scm,
gash/built-ins/umask.scm,
gash/eval.scm,
tests/unit/automake.scm: Use '(gash compat)'.

squash! Add support for Guile 2.0.9.
2019-05-20 18:07:47 -04:00