Repository navigation
New features:
- add shell builtin
bind, it defines key bindings that executes a builtin, alias or command with job control - add shell builtin
edit-text, it launches the first available program among:$VISUAL$EDITORsensible-editoreditornanoemacsvi - add shell special variables
$0$1...$9and${NNN}for accessing runtime arguments - add executable
schemesh-scriptfor simplifying running scripts with runtime arguments - add command line options
--file FILEand--script FILE [ARG...]that can load files in Scheme or shell syntax, and can also load compiled Scheme libraries. - add command line options
-t TYPEand--type TYPEfor setting the type of subsequent files in command line - add functions
(lineedit-cleanup-before-cmd)and(lineedit-cleanup-after-cmd)for coordinating line editing
with key bindings that arbitrarily modify input lines or write to the terminal - add function
(lineedit-key-edit-input)for editing input lines with the preferred editor: uses shell builtinedit-text - add functions
(lineedit-key-sh-run)(lineedit-key-sh-run/i)for starting jobs from a key binding - add functions
(file-mkstemp->fd)and(values->status) - add function
(sh-alias)for defining shell aliases that can execute arbitrary code - not just run a builtin or command - add function
(sh-job-verbose?)and(sh-job-verbose?-set!)for getting/setting a job's verbose flag:
REPL shows job status changes notifications only for verbose jobs - add bytevector-related functions
(bytevector0?)(bytevector-prefix?)(bytevector-suffix?) - add or refactor string-related functions conforming to R7RS SRFI 13 String Libraries:
(string-any)(string-count)(string-every)(string-fold)(string-fold-right)(string-for-each-index)(r7rs:string-for-each)(string-index)(string-index-right)(string-map)(string-map!)(string-null?)(string-prefix?)(string-suffix?)(string-unfold)
Improvements:
- for sanity, shell builtin
commandnow cannot be shadowed by an alias - flush current and console ports after each evaluation at REPL
- if some stopped job is present, display once the message
"There are stopped jobs."instead of exiting immediately from shell builtinexitand uponEOFat REPL. See issue #65 - harden command line file evaluation, REPL and linectx against tty I/O errors
- improve Android Termux support in
Makefile - improve functions
(sh-eval-file...), they now can also load compiled Scheme libraries - on ELF systems, install wrappers for C functions
pthread_mutex_...()and never suspend a thread as long as it owns some locked mutex - rename library
(schemesh shell paths)->(scheme2k posix path)and change its license GPL v2+ -> LGPL v2+
Bug fixes:
- fix issue #62: update
(sh-env-ref)and shell environment variable$PWDto always return the relevant job's current directory - fix issues #67 #68 #69 #71 #72: several glitches in shell parser
- fix issue #74: infinite recursion in UTF-8b output ports when writing to the underlying binary port repeatedly fails
- fix issue #80: shell redirection
>&had no effect - fix issue #82: file descriptor leak caused hang when piping the output of a redirected command
- fix issue #83:
(sh-run/bytevector)and friends caused scroll and prompt redraw if called from linectx key bindings,
because they tried to show status changes of a silent job - fix issue #84: source code was displayed without quoting/escaping in conditions raised by syntax errors
- fix
(sh-home->~)not to shorten paths that merely share a prefix with user's home, as for example/home/user_foobar - fix several deadlocks in thread-related functions: no longer keep track of exited threads id, status and name