1. 28 Dec, 2020 1 commit
  2. 21 Aug, 2020 1 commit
  3. 31 Mar, 2020 1 commit
  4. 22 Mar, 2020 2 commits
  5. 17 Mar, 2020 2 commits
    • Timothy Sample's avatar
      Add the wait built-in. · 855e15f9
      Timothy Sample authored
      * gash/built-ins/wait.scm: New file.
      * Makefile.scm (SOURCES): Add it.
      * geesh/built-ins.scm (*built-ins*): Add 'wait'.
      855e15f9
    • Timothy Sample's avatar
      Add basic support for asynchronous commands. · a0b6189c
      Timothy Sample authored
      * gash/environment.scm (*last-job*): New variable.
      (get-last-job): New procedure.
      (set-last-job!): New procedure.
      (reap-child-processes!): New procedure.
      * gash/eval.scm (eval-sh): Handle '<sh-async>'.
      * gash/gash.scm (main): Reap child processes.
      * gash/repl.scm (run-repl): Likewise.
      * gash/shell.scm (sh:async): New procedure.
      * gash/word.scm (parameter-ref): Handle "!".
      a0b6189c
  6. 07 Feb, 2020 3 commits
  7. 05 Feb, 2020 3 commits
  8. 16 Dec, 2019 2 commits
  9. 10 Dec, 2019 1 commit
  10. 09 Dec, 2019 23 commits
    • Timothy Sample's avatar
      98b60c0d
    • janneke's avatar
      Allow 'make dist' in a Git worktree. · 45223e7d
      janneke authored and Timothy Sample's avatar Timothy Sample committed
      
      
      * Makefile.am (dist-hook, gen-ChangeLog): Test for mere existence of
      .git instead of asserting a directory.
      Co-authored-by: Timothy Sample's avatarTimothy Sample <samplet@ngyro.com>
      45223e7d
    • Timothy Sample's avatar
      Generate the ChangeLog reproducibly. · a4cfff06
      Timothy Sample authored
      * build-aux/gitlog-to-changelog-repro.patch: New file.
      * Makefile.am (EXTRA_DIST): Add it.
      (build-aux/gitlog-to-changelog-repro): New rule.
      (gen-ChangeLog): Use 'gitlog-to-changelog-repro'.
      (DISTCLEANFILES): Add 'build-aux/gitlog-to-changelog-repro'.
      a4cfff06
    • janneke's avatar
      Generate reproducible source tarballs. · fda97e32
      janneke authored and Timothy Sample's avatar Timothy Sample committed
      
      
      * Makefile.am (dist-hook): Generate a '.tarball-timestamp' file.
      (GZIP_ENV): Override, adding '--no-name'.
      (am__tar): Override, adding flags to create reproducible source
      tarballs.
      Co-authored-by: Timothy Sample's avatarTimothy Sample <samplet@ngyro.com>
      fda97e32
    • Timothy Sample's avatar
      Allow running 'make dist' from extracted tarball. · 82b67692
      Timothy Sample authored
      * Makefile (dist-hook): Check for '.git' before generating
      '.tarball-manifest'.
      82b67692
    • Timothy Sample's avatar
      Generate ChangeLog from Git. · f005b1ac
      Timothy Sample authored
      * ChangeLog: Update Git log URL and add a copyright notice.
      * Makefile.am (gen-ChangeLog): Use 'gitlog-to-changelog' to generate
      the ChangeLog.
      f005b1ac
    • janneke's avatar
      gash compat textual-ports: Add put-char. · 6f81266e
      janneke authored and Timothy Sample's avatar Timothy Sample committed
      * gash/compat/textual-ports.scm: Add put-char.
      6f81266e
    • Timothy Sample's avatar
      Initialize the current locale on Guile 2.0. · d905679e
      Timothy Sample authored
      * gash/gash.scm: Initialize the current locale on Guile 2.0.
      d905679e
    • Timothy Sample's avatar
      Allow one-armed 'if-guile-version-below'. · 2d41b4ae
      Timothy Sample authored
      * gash/compat.scm: Allow one-armed 'if-guile-version-below' syntax and
      use it to simplify the conditional definitions throughout.
      2d41b4ae
    • Timothy Sample's avatar
      Use bindings with regular built-ins. · 4f90afcd
      Timothy Sample authored
      * gash/shell.scm (sh:exec-let): Save and set variables according to
      'bindings' before executing a regular built-in.
      4f90afcd
    • Timothy Sample's avatar
      Reap every process in a pipeline. · 8a440f35
      Timothy Sample authored
      * gash/shell.scm (waitpid/any): New procedure.
      (sh:pipeline): Use it to reap every process spawned while executing a
      pipeline.
      8a440f35
    • Timothy Sample's avatar
      Do not leak ports into pipeline processes. · d600f82f
      Timothy Sample authored
      * gash/shell.scm (swap-and-shift-pairs): Remove procedure.
      (make-pipes): Remove procedure.
      (plumb): Accept another port as an argument and close it when setting
      up the child process.
      (sh:pipeline): Do not use 'make-pipes' to create all the pipe ports
      upfront, but rather create them as needed and give them directly to
      'plumb'.
      d600f82f
    • janneke's avatar
      Test executing redirect-created files immediately. · 7eacf528
      janneke authored and Timothy Sample's avatar Timothy Sample committed
      
      
      * tests/redirects.org (Files opened for redirect can be executed
      immediately): New test.
      Co-authored-by: Timothy Sample's avatarTimothy Sample <samplet@ngyro.com>
      7eacf528
    • Timothy Sample's avatar
      Close ports opened for redirects. · 121d9cb4
      Timothy Sample authored
      * gash/shell.scm (redir->parameter+port): Rename this...
      (process-redirect): ...to this, and make it return a list with the
      third element being a boolean indicating if the port was opened by us.
      (sh:with-redirects): Close ports when the new boolean is set.
      121d9cb4
    • Timothy Sample's avatar
      Enable 'glob' specification test · 22205a00
      Timothy Sample authored
      * tests/spec/Makefile.am (TESTS): Add 'glob'.
      * tests/spec/oil.scm: Patch one of its tests and filter out eleven
      others.
      22205a00
    • Timothy Sample's avatar
      Respect the 'noglob' option. · 168f4229
      Timothy Sample authored
      * gash/word.scm (expand-pathnames): Do not expand pathnames if the
      'noglob' option is set.
      168f4229
    • Timothy Sample's avatar
      Fix pathname expansion. · 3d3375e0
      Timothy Sample authored
      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.
      3d3375e0
    • Timothy Sample's avatar
      Simplify the 'pattern' data structure. · 76875521
      Timothy Sample authored
      * gash/pattern.scm (<pattern>): Remove the 'start-anchored?' and
      'end-anchored?' fields.
      (parse-pattern): Replace the fields with empty parts at the start or
      end of the parts list.
      (pattern-plain?): Instead of checking the fields, just check the
      number of parts.
      (pattern-match?, pattern-drop, pattern-drop-right): Do not worry about
      the fields, because the empty parts ensure the right thing happens.
      76875521
    • Timothy Sample's avatar
      Swap semantics of ':+' and '+'. · cf6a886f
      Timothy Sample authored
      These were mixed up, with ':+' behaving like '+' and vice versa.
      
      * gash/word.scm (word->qword): Swap implementations of '<sh-ref-and>'
      and '<sh-ref-and*>'.
      * tests/unit/word.scm: Swap tests.
      cf6a886f
    • Timothy Sample's avatar
      Enable 'command-sub' specification test · 4acbd303
      Timothy Sample authored
      * tests/spec/Makefile.am (TESTS): Add 'command-sub'.
      * tests/spec/oil.scm: Patch four of its tests and filter out another.
      4acbd303
    • Timothy Sample's avatar
      Fix case statements in '$(...)' substitutions. · 49ac5e74
      Timothy Sample authored
      * gash/parser.scm (make-parser): Fix the 'pattern!' rule so that it
      gets reduced before reading an 'RPAREN' token.
      49ac5e74
    • Timothy Sample's avatar
      Add test for backquoted commands in heredocs. · 66685b62
      Timothy Sample authored
      * tests/unit/parser.scm: Add test.
      66685b62
    • Timothy Sample's avatar
      Correctly parse double-quoted backquoted commands. · 7deaa94b
      Timothy Sample authored
      * gash/lexer.scm (read-backquoted-command): Make the default procedure
      accept a 'quoted?' keyword.
      (get-backquoted-command): Accept a 'quoted?' keyword and pass it on to
      'read-backquoted-command'.
      (get-expansion): Accept a 'quoted?' keyword and pass it on to
      'get-backquoted-command'.
      (get-double-quotation): Set the 'quoted?' keyword when calling
      'get-expansion'.
      * tests/unit/lexer.scm: Add tests.
      * gash/parser.scm (call-with-backquoted-input-port): Accept a
      'quoted?' keyword which, if set, adds the double quote character to
      the set of escapable characters.
      (read-sh/backquoted): Accept a 'quoted?' keyword and pass it on to
      'call-with-backquoted-input-port'.
      * tests/unit/parser.scm: Add tests.
      7deaa94b
  11. 08 Dec, 2019 1 commit
    • Timothy Sample's avatar
      Implement asserting references. · 8135e199
      Timothy Sample authored
      * gash/word.scm (word->qword): Add an implementation for the
      '<sh-ref-assert>' and '<sh-ref-assert*>' cases.
      * tests/variable-operators.org: New file.
      * Makefile.am (FULL_TESTS): Add it.
      8135e199