aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/sh.c
AgeCommit message (Collapse)Author
2020-04-27Add gratuitous typecast to work around insane warning.Rob Landley
(long is 32 bits on 32 bit systems, just use long already)
2020-04-27Redo toysh variable expansion plumbing to start ${} (variable expansion canRob Landley
now return error), inline utf8spnc and merge_arg(), unify "break" logic, fix "continue" and "done; done", fix cd not to expand arguments twice
2020-04-14Implement $''Rob Landley
2020-04-14Start of $- and set flags support.Rob Landley
2020-04-12Fix sh -c 'CONSOLE="$(</sys"' segfault (don't advance twice after quote).Rob Landley
2020-04-12Add shift and $[], fix exec.Rob Landley
2020-04-09Fix "else" loop.Rob Landley
2020-04-08Implement ! and $$ and fix quoted "$(subshell)"Rob Landley
2020-04-06Pass more tests, and detect ELF files (don't try to run them as shell scripts).Rob Landley
Don't fall back to stdin if we can't find shell script on command line.
2020-04-04Fix lifetime rules in bracket expansion.Rob Landley
2020-04-02More shell plumbing. Redo of variable storage, add export.Rob Landley
2020-03-18Next round of shell work.Rob Landley
Rethink syntax_err a bit. Try to track top level shell pid for $$ including passing it to nommu subshells. Reset hfd more often so it doesn't climb endlessly. Leak fewer filehandles and detect more filehandle exhaustion errors. Replace skip_quote() with a second mode for parse_word(). Fix $() and implement $(<input).
2020-03-13Pass a few more test suite entries.Rob Landley
2020-03-13Fix "eval x=y", add exec, only prompt if stdin is a tty, search $PATH for scriptRob Landley
2020-03-12Shuffle code around: eliminate one of two function prototypes, add "static"Rob Landley
to functions that aren't entry points, and collate debug code at top.
2020-03-11Redo NOFORK plumbing so commands like eval/unset can access/edit shell state.Rob Landley
2020-03-09Next round of shell plumbing: variable expansion with $IFS.Rob Landley
Not entirely debugged, but more or less there-ish.
2020-03-05Fix 'for i in one two three; do echo =$i=; done'Rob Landley
2020-03-01Snapshot of variable resolution implementation. Not remotely load bearing yet.Rob Landley
2020-02-06Basic parenthetical subshell support.Rob Landley
2020-02-04More (subshell) work (not finished), fix {block;} | pipes.Rob Landley
2020-02-01Auto-initialize variables, some of which are readonly and some exported.Rob Landley
2020-01-30Couple more tests and sh comment changes. (Mostly todo list tracking.)Rob Landley
2020-01-29Quick and dirty "echo $ABC" support, done totally the wrong way, but itRob Landley
makes those two remaining tests pass.
2020-01-26Implement nommu subshell plumbing, <(command), and fix 2>&1Rob Landley
2020-01-11Fix a duplicate free() and a variable stomp, set s=s to fix "can never beRob Landley
used uninitalized" warning, move flow control character detection to the right place, change scratch zeroing to the same way main() does it.
2020-01-11sh.c: fix memory corruption due to uninitialized sh_function in sh_runRich Felker
2020-01-08Remove lots of debugging dprintf()s.Rob Landley
2020-01-08Fix commaless brace discard.Rob Landley
2020-01-08Implement quote removal and fix unterminated bracket expansion.Rob Landley
2020-01-07Bracket support in progress. Mind the dprintf()s.Rob Landley
2020-01-03Add local variables support.Rob Landley
2020-01-03Finish cd, make help -ahu unconditional, fix expand memory cleanup path,Rob Landley
set $HOME $PWD and $OLDPWD, fix prompt \w, shuffle some functions around to avoid prototypes, implement tilde expansion, add FORCE_COPY.
2020-01-01Factor out array_add(), replace argxtend().Rob Landley
2020-01-01If allocation update is done in blocks, initial allocation has to populateRob Landley
a full block.
2019-12-31toysh: start of <(echo hello) support.Rob Landley
2019-12-29Implement single command env assignments (abc=def command) and make debugRob Landley
output #definable.
2019-12-29Debug basic pipe support and I/O flush for builtins.Rob Landley
2019-12-28Next round of sh plumbing: more work on redirect and pipe, use CLOEXEC.Rob Landley
2019-12-23Toysh passes two tests now! Woo! (Otherwise, does not remotely work right now.)Rob Landley
2019-12-12Next round of toysh work, with associated lib plumbing.Rob Landley
2019-09-08make "for i in" work.Rob Landley
2019-08-29Fix sh handling nested if/else/elif statements alaRob Landley
if true; then if false; then echo one; elif echo two; then echo three; else echo four; fi; fi
2019-08-18Next round of shell plumbing.Rob Landley
You can now run: echo hello; if true; then echo hello; fi; while true; do echo hello; done It's got the start of for loops but needs environment variable resolver to do much with them.
2019-08-09Split out run_function() and free_function(), add start of _TOYSH_LOCALSRob Landley
marshalling for vforked subshells, fix rc returned from run_pipeline for variable assignment. (Well, sort of: X=$(false) still needs rc = 1.)
2019-08-04Make "if true; then echo hello; fi" work. More work on redirection.Rob Landley
2019-08-02Next round of infrastructure. Start of redirect logic and runtime flow control.Rob Landley
2019-07-22Next round of plumbing evolution. Left in the todo and debug code this time.Rob Landley
2019-07-11Next sh checkpoint. Not remotely load bearing yet.Rob Landley
2019-06-29More toysh flow control plumbing.Rob Landley