janetsh
janetsh copied to clipboard
A powerful new shell that uses the janet programming language for both the implementation and repl.
When you background something with ctrl-z running (fg-job) with no arg may be useful. Perhaps some *last-job* variable may also be useful.
I recently wanted to print out all the commands a script was executing (A C build script) - It was very hard to do so, In bash you do something...
``` $CC $CFLAGS ``` Would run cc with a single arg, rather than expanding out the env.
Currently it is more like: Launch job, and if fg job - wait for it. It may be nicer to refactor it to just launch jobs, and in other places...
The 'env' builtin used for printing doesn't provide nice escaping, and if an env variable has contents that look like an env variable assignment it causes even more problems.
It could be confusing, especially in script mode if a user requests $? and then the job stops. $$ and $$_ may not need any change because they wait for...
Readline has a user interface for this IIRC, but I would like an api.
examples: ``` ($ gcc (sh/split ($$ pkg-config --cflags))) ``` This is useful for building commands lines from the output of other commands. Counter argument is that regular string splitting works...