descriptionnone
ownerKAction@debian.org
last changeFri, 27 Feb 2015 06:38:09 +0000 (27 09:38 +0300)
content tags
add:
README
guile-bash
==========

Guile-bash project provides shared library and set of Guile modules,
allowing you to extend Bash with lisp. You have means to access everything
in Bash process and the following aspects are given interface in scheme-spirit
without need to know anything about Bash internals:

- aliases
- setting and getting Bash variables
- creating dynamic variables
- creating bash function with Scheme implementation
- reader macro for output capturing
- reader macro for evaluating raw bash commands

This is fragment of my bash configuration:

(for-index [ix <- (1 .. 9)]
  (add-alias (~ "aw~d" ix) (~ "awk '{ print $~d }' " ix)))

(with-everything-catched
  (for-list (bin = emacs tmux fbterm env dtach)
    (unless (availiable? bin)
      (error 'required-program-is-not-availiable bin)))
  (when (and with-X? (not with-tmux?))
    #$ [exec tmux -2])
  (dtach-start-emacs)
  (when (equal? "/dev/tty1" #$(tty))
    #$[exec /usr/bin/fbterm -- /usr/bin/env TERM=fbterm tmux new])
  (when with-tmux?
    #$[source ~/.dircolors.sh]))

(let ((availiable-locales (string-split #$(locale -a) #\newline)))
  (let/ec escape
    (for-list (lang = eo eo_XX ru_RU en_US C)
      (for-list (enc = UTF-8 utf8)
	(define locale (~ "~a.~a" lang enc))
	(when (member locale availiable-locales)
	  #$[export LC_ALL]
	  (escape (set! #$LC_ALL locale)))))))

(for-each append-to-path
	  (list (~ "~a/scripts" +rc-root+)
		#$(echo ~/.cabal/bin)
	        #$(echo ~/.local/bin)))
shortlog
2015-02-27 Dmitry BogatovEnable using of #[expr] syntax in conditionalsmaster
2015-02-25 Dmitry BogatovEmulate errexit option
2015-02-25 Dmitry Bogatovnew script: run guile-bash scripts
2015-02-25 Dmitry BogatovDisable guile auto compilation at build time
2015-02-01 Dmitry BogatovChanged soname to match project name
2015-02-01 Dmitry BogatovAdd gitignore for in-source build
2015-01-31 Dmitry BogatovRemove tests check files on maintainer-clean
2015-01-31 Dmitry BogatovFix staged build
2015-01-31 Dmitry BogatovFix leftover magic word
2015-01-31 Dmitry BogatovAdd readme
2015-01-31 Dmitry BogatovRelease v0.1
2015-01-30 Dmitry BogatovAdd string-like: ffi-object for more convenient alias...
2015-01-30 Dmitry BogatovRemove dead code
2015-01-30 Dmitry BogatovAdd `define-bash-function` macro
2015-01-29 Dmitry BogatovRestore tests about scm-functions
2015-01-27 Dmitry BogatovRename magic-variables to dynamic-variables
...
heads
9 years ago master