This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require-extension ansi-escape-sequences srfi-19 srfi-1 srfi-13 posix) | |
(define (reload-config) (load "~/.hiss")) | |
(define-syntax install (syntax-rules () ((sudo arg1 ...) (_raw sudo apt-get install arg1 ...)))) | |
(define-syntax ! (syntax-rules () ((! arg1 ...) (_raw arg1 ...)))) | |
(define-syntax apt-search (syntax-rules () ((apt-search arg1 ...) (_raw aptitude search arg1 ...)))) | |
(define ++ string-append) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (put-options #!key canned-acl metadata content-type expires storage-class) | |
(when (and canned-acl | |
(not (member canned-acl '(private full-control public read authenticated-read)))) | |
(error "invalid canned-acl specified")) | |
(filter (cut cdr <>) | |
`((canned-acl . ,canned-acl) (metadata . ,metadata) (content-type . ,content-type) | |
(expires . ,expires) (storage-class . ,storage-class)))) | |
(define (put-object! bucket key object-thunk object-length object-type . options) | |
(perform-aws-request bucket: bucket path: key verb: "PUT" content-type: object-type body: object-thunk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(teejay@teejays-eee)-(/home/teejay/thomas/programming/scheme/shell)-(22:29:31) | |
$ (ls) | |
shell shell.scm shell.scm~ | |
(teejay@teejays-eee)-(/home/teejay/thomas/programming/scheme/shell)-(22:30:00) | |
$ (+ 1 2) | |
3 | |
(teejay@teejays-eee)-(/home/teejay/thomas/programming/scheme/shell)-(22:30:07) | |
$ (ls -A) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ (ls) | |
shell shell.scm shell.scm~ | |
$ (+ 1 2) | |
3 | |
$ (ls -A) | |
.git shell shell.scm shell.scm~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require-extension ansi-escape-sequences srfi-19) | |
(repl-prompt | |
(lambda () | |
(let ((is-root? (lambda (user) (string=? user "root"))) | |
(user (car (user-information (current-user-id))))) | |
(string-append "(" | |
(set-text (if (is-root? user) '(fg-red) '(fg-green)) | |
(string-append user "@" (or (get-host-name) ""))) | |
")-(" |