aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/sh.c
AgeCommit message (Collapse)Author
2020-12-26toysh: fix break/continueRob Landley
2020-12-25toysh fixes and testsRob Landley
2020-12-19Fix (( )) quote termination.Rob Landley
2020-12-15Implement set, trace support, and function call context stack.Rob Landley
2020-11-27toysh: Adjust $0 for scripts.Rob Landley
2020-11-16Factor out do_source(), fpathopen(), and prompt_getline().Rob Landley
Use 0 optstr prefix, fix bug initializing toys.envc one too low.
2020-10-23Fix endless recursion bug on nommu for sh -c 'echo $(echo)'Rob Landley
2020-10-19More tests, and a workaround to pass one of them.Rob Landley
(The bug is that "echo hello \" followed by just enter should end the $PS2 state but it persists when the line is empty because resulting collated line still ends with \ so it wants another line.)
2020-10-19Implement source, fix empty ${x-alt}, use %zu as suggested by e5ten.Rob Landley
2020-10-14Fix && || traversing loops, and typecast past size_t being stupidly typed.Rob Landley
2020-10-14Implement ${var/search/replace}Rob Landley
2020-10-13Fix up ${x%y} ${x^y} ${x,y} and add tests.Rob Landley
2020-10-11toysh: more variable/wildcard plumbing and tests.Rob Landley
2020-10-06toysh: Yank debug scaffolding.Rob Landley
2020-10-06toysh file wildcards: echo toys/*/*.c works now.Rob Landley
2020-10-04Implement ${x#y} and ${x##y}Rob Landley
Debug wildcard * match, teach skipslash() to fill out a wildcard deck, make collect_wildcards() flush remove the parsing-only 0th entry.
2020-10-01Debug wildcard plumbing.Rob Landley
2020-09-27Implement wildcard match plumbing. (Not yet fully debugged.)Rob Landley
2020-09-14Fix multiline case/esac parsing, make syntax_err() exit non-interactveRob Landley
contexts like scripts, and tweak debug scaffolding.
2020-09-05Fix segfault for sh -c 'echo {a..Z}'Rob Landley
Bash produces different output for that test, but I'm not sure I care? http://lists.landley.net/pipermail/toybox-landley.net/2020-September/011990.html The problem is parse_word() guarantees its output's quotes/escapes are completed, but brace expansion happens after parse_word() and thus violating assumptions later code depends on to not do redundant error checking. The easy fix is to escape punctuation produced by parse_word (which in bash can only happen when you span upper and lower case ranges so "\" is the only interesting character). I could special case this to match bash exactly, but I'm waiting for someone to complain instead.
2020-09-03Implement brace sequence expressions ala {a..z} and {1..37..2}Rob Landley
2020-08-31Implement select.Rob Landley
2020-08-31Implement case/esac, add more wildcard tests.Rob Landley
2020-08-05toysh: next round of wildcard plumbingRob Landley
2020-07-28toysh: more wildcard plumbingRob Landley
2020-07-22toysh: Start of wildcard plumbing.Rob Landley
2020-07-15toysh: NOSPLIT shouldn't collate whitespace $IFSRob Landley
2020-07-14toysh: honor nosplit, expand_one_arg shouldn't free (that's what del list for)Rob Landley
2020-07-12Fixing up failing tests cases.Rob Landley
2020-07-11Chunk of job control plumbing and start of ${x:1:3} variable slicing support.Rob Landley
2020-06-10Chunk of job control pumbing.Rob Landley
2020-06-09Inline/remove block_end() and skip_andor(). Add ->end pointer to sh_pipelineRob Landley
pointing to end of current block so we don't have to search for it later.
2020-05-27Convert array_add() to arg_add().Rob Landley
2020-05-26Fix syntax checking for "if true; then echo hello | fi", fix some tests,Rob Landley
slightly more elaborate debug output.
2020-05-17Don't ask for line continuation when ending with &Rob Landley
2020-05-05Link to bash man page.Rob Landley
2020-05-05Remove leftover increment and move variable clear after error report.Rob Landley
2020-05-04Restore error message for command not found, don't let ctrl-C kill shell.Rob Landley
2020-05-03Fix "make root && chroot root/host/fs /init" with glibc host compiler.Rob Landley
2020-05-03Next round of shell work.Rob Landley
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