diff --git a/README b/README index af48962..f2ce0f1 100644 --- a/README +++ b/README @@ -1,11 +1,3 @@ -ANGUISH: that which you might experience when your shell -falls short of expressing your programming solution - -or - -AN[other] GUIle SHell -Anguish is Not a GUIle SHell - This project aims to produce at least a POSIX compliant sh replacement or even implement GNU bash. On top of that it also intends to make scheme available for interactive and scripting application. The @@ -24,7 +16,5 @@ functional programming, however now I mostly experience that the language itselfs folds on functional expression, pun intended. - - * history flattened vs full, i.e. navigate interactively without redundancy vs export as script diff --git a/TODO b/TODO index b0bc823..178cd71 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ * setup test driven development: done -* execute tests using anguish: done +* execute tests using gash: done * parsing posix shell: nested "'""'": done * globbing: done * job control: done diff --git a/anguish b/anguish deleted file mode 100755 index a59d3c4..0000000 --- a/anguish +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/guile \ ---debug -e main -s -!# -;; workaround: -;; -e (@ (sh anguish) main) -s -;; leads to: -;; ERROR: In procedure read: -;; ERROR: In procedure scm_i_lreadparen: #:1:3: end of file - -(define (main args) - (set! %load-path (cons (dirname (car args)) %load-path)) - ((@ (sh anguish) main) args)) diff --git a/bin/gash b/bin/gash new file mode 100755 index 0000000..45aae8b --- /dev/null +++ b/bin/gash @@ -0,0 +1 @@ +guile -L $(dirname $0)/.. -e '(@ (gash gash) main)' -s $(dirname $0)/../gash/gash.scm $* diff --git a/gash b/gash deleted file mode 100755 index 9a26feb..0000000 --- a/gash +++ /dev/null @@ -1 +0,0 @@ -guile -L $(dirname $0) -e '(@ (sh anguish) main)' -s $(dirname $0)/sh/anguish.scm $* diff --git a/sh/anguish.scm b/gash/gash.scm similarity index 96% rename from sh/anguish.scm rename to gash/gash.scm index dfd6282..cde0ccb 100644 --- a/sh/anguish.scm +++ b/gash/gash.scm @@ -1,4 +1,5 @@ -(define-module (sh anguish) +(define-module (gash gash) + :use-module (srfi srfi-1) :use-module (srfi srfi-26) @@ -11,11 +12,11 @@ :use-module (ice-9 buffered-input) :use-module (ice-9 regex) - :use-module (sh job) - :use-module (sh pipe) - :use-module (sh peg) - :use-module (sh io) - :use-module (sh util) + :use-module (gash job) + :use-module (gash pipe) + :use-module (gash peg) + :use-module (gash io) + :use-module (gash util) :export (main)) @@ -30,7 +31,7 @@ (define (display-help) (display "\ -anguish [options] +gash [options] -h, --help Display this help -p, --parse Parse the shell script and print the parse tree -v, --version Display the version @@ -38,14 +39,12 @@ anguish [options] (define (display-version) (display " -Anguish 0.1 +GASH 0.1 Copryright (C) 2016 R.E.W. van Beusekom, rutger.van.beusekom@gmail.com. -This is anguish, ANother GUIle SHell, or the feeling you might have -when your shell lacks a real programming language. Anguish is free -software and is covered by the GNU Public License, see COPYING for the -copyleft. +This is gash, Guile As SHell. Gash is free software and is covered by +the GNU Public License, see COPYING for the copyleft. ")) @@ -80,7 +79,7 @@ copyleft. (let* ((asts (map file-to-ast files)) (status (map run asts))) (quit (every identity status)))) - (#t (let* ((HOME (string-append (getenv "HOME") "/.anguishistory")) + (#t (let* ((HOME (string-append (getenv "HOME") "/.gash_history")) (thunk (lambda () (let loop ((line (readline (prompt)))) (when (not (eof-object? line)) diff --git a/sh/io.scm b/gash/io.scm similarity index 91% rename from sh/io.scm rename to gash/io.scm index 67d3cb3..28a3b7c 100644 --- a/sh/io.scm +++ b/gash/io.scm @@ -1,4 +1,4 @@ -(define-module (sh io) +(define-module (gash io) :export (stdout stderr)) diff --git a/sh/job.scm b/gash/job.scm similarity index 98% rename from sh/job.scm rename to gash/job.scm index 0d4f13e..306d3f3 100644 --- a/sh/job.scm +++ b/gash/job.scm @@ -1,11 +1,11 @@ -(define-module (sh job) +(define-module (gash job) :use-module (srfi srfi-1) :use-module (srfi srfi-8) :use-module (srfi srfi-9) :use-module (srfi srfi-26) - :use-module (sh io) - :use-module (sh util) + :use-module (gash io) + :use-module (gash util) :export (job-control-init jobs report-jobs fg bg new-job job-add-process add-to-process-group wait)) diff --git a/sh/peg.scm b/gash/peg.scm similarity index 99% rename from sh/peg.scm rename to gash/peg.scm index 165c8bb..591fb1f 100644 --- a/sh/peg.scm +++ b/gash/peg.scm @@ -1,4 +1,4 @@ -(define-module (sh peg) +(define-module (gash peg) :use-module (ice-9 peg) :use-module (ice-9 peg codegen) diff --git a/sh/pipe.scm b/gash/pipe.scm similarity index 97% rename from sh/pipe.scm rename to gash/pipe.scm index 1572a5a..88ac290 100644 --- a/sh/pipe.scm +++ b/gash/pipe.scm @@ -1,4 +1,4 @@ -(define-module (sh pipe) +(define-module (gash pipe) :use-module (ice-9 popen) @@ -7,7 +7,7 @@ :use-module (srfi srfi-9) :use-module (srfi srfi-26) - :use-module (sh job) + :use-module (gash job) :export (pipeline)) diff --git a/sh/util.scm b/gash/util.scm similarity index 91% rename from sh/util.scm rename to gash/util.scm index 383b500..a0ecc52 100644 --- a/sh/util.scm +++ b/gash/util.scm @@ -1,4 +1,4 @@ -(define-module (sh util) +(define-module (gash util) :use-module (srfi srfi-1) :use-module (srfi srfi-26) diff --git a/test-anguish.sh b/test-anguish.sh deleted file mode 100755 index 465b064..0000000 --- a/test-anguish.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -for f in test/*; do echo $f; ./anguish $f; done diff --git a/test-bash.sh b/test-bash.sh deleted file mode 100755 index e16eb8d..0000000 --- a/test-bash.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -for f in test/*; do echo $f; bash $f; done