complete rename from anguish to gash
This commit is contained in:
parent
1bfb752b3c
commit
0a75234e52
10
README
10
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
|
||||
|
|
2
TODO
2
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
|
||||
|
|
12
anguish
12
anguish
|
@ -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))
|
|
@ -0,0 +1 @@
|
|||
guile -L $(dirname $0)/.. -e '(@ (gash gash) main)' -s $(dirname $0)/../gash/gash.scm $*
|
1
gash
1
gash
|
@ -1 +0,0 @@
|
|||
guile -L $(dirname $0) -e '(@ (sh anguish) main)' -s $(dirname $0)/sh/anguish.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))
|
|
@ -1,4 +1,4 @@
|
|||
(define-module (sh io)
|
||||
(define-module (gash io)
|
||||
|
||||
:export (stdout stderr))
|
||||
|
|
@ -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))
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(define-module (sh peg)
|
||||
(define-module (gash peg)
|
||||
:use-module (ice-9 peg)
|
||||
:use-module (ice-9 peg codegen)
|
||||
|
|
@ -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))
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(define-module (sh util)
|
||||
(define-module (gash util)
|
||||
:use-module (srfi srfi-1)
|
||||
:use-module (srfi srfi-26)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
for f in test/*; do echo $f; ./anguish $f; done
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
for f in test/*; do echo $f; bash $f; done
|
Loading…
Reference in New Issue