complete rename from anguish to gash

This commit is contained in:
Rutger van Beusekom 2017-02-19 13:49:30 +01:00
parent 1bfb752b3c
commit 0a75234e52
13 changed files with 22 additions and 49 deletions

10
README
View File

@ -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

2
TODO
View File

@ -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

12
anguish
View File

@ -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: #<unknown port>:1:3: end of file
(define (main args)
(set! %load-path (cons (dirname (car args)) %load-path))
((@ (sh anguish) main) args))

1
bin/gash Executable file
View File

@ -0,0 +1 @@
guile -L $(dirname $0)/.. -e '(@ (gash gash) main)' -s $(dirname $0)/../gash/gash.scm $*

1
gash
View File

@ -1 +0,0 @@
guile -L $(dirname $0) -e '(@ (sh anguish) main)' -s $(dirname $0)/sh/anguish.scm $*

View File

@ -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))

View File

@ -1,4 +1,4 @@
(define-module (sh io)
(define-module (gash io)
:export (stdout stderr))

View File

@ -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))

View File

@ -1,4 +1,4 @@
(define-module (sh peg)
(define-module (gash peg)
:use-module (ice-9 peg)
:use-module (ice-9 peg codegen)

View File

@ -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))

View File

@ -1,4 +1,4 @@
(define-module (sh util)
(define-module (gash util)
:use-module (srfi srfi-1)
:use-module (srfi srfi-26)

View File

@ -1,2 +0,0 @@
#!/bin/bash
for f in test/*; do echo $f; ./anguish $f; done

View File

@ -1,2 +0,0 @@
#!/bin/bash
for f in test/*; do echo $f; bash $f; done