summaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Oops. I left in some debug noise.Eric Andersen2001-05-151-1/+0
|
* Write set_local_var() and fixup lookup_param() so you can now useEric Andersen2001-05-151-4/+101
| | | | | shell local variables. -Erik
* This patch covers one big part of variable handling.Eric Andersen2001-05-151-5/+49
| | | | | | | | | | | | | | | $ a=b foo should be handled correctly. $ a=b is parsed OK, but the actual variable setting is not yet written. Except for some weird exceptions related to quoting rules, this code passes (matches ash behavior) all the tests I threw at it. If someone now writes set_local_var(), and updates lookup_param() to match, we can claim success! - Larry
* Fix up some silly warningsEric Andersen2001-05-112-6/+6
|
* Fix a segfault in lash, hush, and cmdedit. Each of these usedEric Andersen2001-05-113-2/+17
| | | | | | xgetcwd, but did not check the return for a NULL, and then continued to call strlen on the NULL when the cwd had been removed from under it. -Erik
* Use xgetcwdEric Andersen2001-05-111-2/+2
|
* A few more structural updates for job control.Eric Andersen2001-05-081-4/+13
| | | | -Erik
* Fix a stupid segfault caused by dereferencing a NULL ptr.Eric Andersen2001-05-081-0/+2
| | | | -Erik
* This patch from Evin Robertson <nitfol@my-deja.com> fixes export so it works.Eric Andersen2001-05-071-1/+4
| | | | | This way leaks memory, but oh well. We will probably fix that when we get around to doing local variables.
* More hush updates from Larry:Eric Andersen2001-05-071-19/+54
| | | | | | | Update some comments. Generate partial placeholders for the missing builtins. Write builtin_umask. Properly treat exec without arguments as a means to open/close files within the running script. Implement "4<&-" that encodes for file descriptor closure.
* Larry's variant on Evin Robertson's fix to what I messed upEric Andersen2001-05-041-1/+1
| | | | | | trying to make job control work. This fix makes it so that hush doesn't error out when init hasn't set up job control, as in when init=/bin/sh
* Don't reset parents context when we encounter an terminator. FixesMatt Kraai2001-05-041-1/+0
| | | | if true; then if true; then true; fi; fi
* If it fails to run a builtin, let it fall through toEric Andersen2001-05-041-1/+0
| | | | | exec the real thing. -Erik
* Move up waitpid error check so that errno isn't clobbered by tcsetpgrp.Matt Kraai2001-05-021-3/+3
|
* Some more job control updates. It will now sucessfully backgroundEric Andersen2001-05-021-46/+74
| | | | | stuff. Good luck getting things back into the foreground though... -Erik
* Don't treat newline as pipe separator when processing substitutions.Matt Kraai2001-05-021-1/+4
|
* Fix $(...) construction. Noted and patched by Larry DoolittleMatt Kraai2001-05-021-0/+1
| | | | <ldoolitt@recycle.lbl.gov>. I'm just a patch whore. :)
* First pass at getting job control working. This gets the infrastructureEric Andersen2001-05-021-13/+142
| | | | | | in place, but something is still missing/wrong in there. Testing with 'grep foo &' seems to put _hush_ into the background. Pondering... -Erik
* Use the current pgrp, not pid, when resetting the foreground process group.Matt Kraai2001-05-021-1/+1
| | | | Fixes bizarre suspension when executing `echo`.
* Don't segfault if the first word is the empty string.Matt Kraai2001-05-021-2/+4
|
* Another update from Larry:Eric Andersen2001-05-021-17/+19
| | | | | Makes hush return code equal to that of the last command executed. Fixes the mode where input comes from a file.
* Another hush update from Larry:Eric Andersen2001-05-011-5/+13
| | | | | | | | | | | | | | Minor improvements. Something is still broken with running scripts via "hush filename". All the following are now handled acceptably (matches ash, not bash). if true; then echo foo1; fi if true; then echo foo2; fi if true; false; then echo bar; else echo foo3; fi if true || false; then echo foo4; fi - Larry
* Some more hush.c updates from Larry Doolittle.Eric Andersen2001-04-301-13/+46
|
* Use BUFSIZ for the_command to match size used in cmdeditEric Andersen2001-04-271-1/+1
|
* An update to hush from Larry:Eric Andersen2001-04-271-94/+20
| | | | | | | | | | | It should recover more smoothly from syntax errors, and it now has a decent guess when the reserved word construct is over (or not) to control execution and prompting. I took out all the redundant standalone test copies of libbb routines, but left in a hook so I can include those for my testing. I'll post that include file on my web site. - Larry
* This is the initial checkin of Larry Doolittle's hush.c, using hisEric Andersen2001-04-261-0/+2191
| | | | | | | | | | | | April 25, 2001 snapshot, adjusted a bit by me so it has cmdedit support. This checkin also removes sh.c. In the future sh.c will be a symlink to your shell of choice. For now, this symlink will default to pointing to lash.c (as in the past). If you change the symlink to point to hush.c, then thats what you will get. This symlink business is a temporary situation, which will be cleaned up Real Soon Now(tm). -Erik
* Moved some #ifdefs down below #include "busybox.h" where they belong.Mark Whitley2001-04-251-2/+2
|
* Some patches from Gennady Feldman. Fixed a glob problem such thatEric Andersen2001-04-232-6/+8
| | | | | 'ls *.h Config.h' works. Fixed a silly typo with fg/bg process control. Made cmdedit exit sanely when it cannot read input.
* Another banner consolidation from Larry Doolittle <ldoolitt@recycle.lbl.gov>.Matt Kraai2001-04-121-1/+1
|
* Fix handling of '' and "".Matt Kraai2001-04-121-4/+6
|
* Apply Vladimir's latest cleanup patch.Eric Andersen2001-04-092-174/+112
| | | | -Erik
* Add support of /W promptsEric Andersen2001-04-051-0/+13
| | | | -Erik
* Avoid segfault when export is invoked with no arguments. Thanks toMatt Kraai2001-04-041-0/+1
| | | | Gennady Feldman.
* Add in a new standalone env applet for fixing up app's environmentsEric Andersen2001-03-291-16/+5
| | | | -Erik
* Fix to last patch: locale code should be 9, not 7.Mark Whitley2001-03-271-1/+1
|
* Applied patch from Vladimir N. Oleynik to add locale support to the shell perMark Whitley2001-03-271-0/+6
| | | | bug report from Ralph Jones.
* -Wshadow sh fix from Jeff GarzikEric Andersen2001-03-231-2/+2
|
* A nice patch from Larry Doolittle that adds -Wshadow andEric Andersen2001-03-211-35/+35
| | | | cleans up most of the now-revealed problems.
* Another cleanup patch from Jeff Garzik <jgarzik@mandrakesoft.com>Eric Andersen2001-03-191-1/+1
|
* Fix to cmdedit.c from VladimirEric Andersen2001-03-191-0/+1
|
* Patch from Larry and Vladimir to clean up sh.c and fixEric Andersen2001-03-171-18/+12
| | | | shell expansion to work in non POSIX locales.
* Fix from Larry for glob problems.Eric Andersen2001-03-151-1/+5
| | | | -Erik
* cmdedit.c bugfix patch from Vladimir.Eric Andersen2001-03-151-12/+14
| | | | -Erik
* Reversed previous patch. The right way is to fix uClibc.Mark Whitley2001-03-151-5/+0
|
* Applied patch from Andreas Neuhaus to fix namespace conflict that made busyboxMark Whitley2001-03-151-0/+5
| | | | not compile with uClibc.
* Yesterday I make strsep_space include post-token whitespace,Eric Andersen2001-03-141-2/+1
| | | | | so we should not be adding another " " between tokens. -Erik
* I forgot to malloc space for the NULL.Eric Andersen2001-03-141-1/+1
| | | | -Erik
* Applied patch from Larry Doolittle to fix '>\na\n' bug. Should close bug #1132Mark Whitley2001-03-141-3/+8
|
* libc5 glob is pretty stupid and doesn't do GLOB_BRACE or GLOB_TILDEEric Andersen2001-03-141-1/+8
| | | | -Erik
* - Changed name of BB_FEATURE_SIMPLE_PROMPT to BB_FEATURE_SH_SIMPLE_PROMPTMark Whitley2001-03-142-11/+11
| | | | | | | | | | | - Set BB_FEATURE_SH_STANDALONE_SHELL and BB_FEATURE_SH_APPLETS_ALWAYS_WIN to be off by default - Set BB_FEATURE_SH_SIMPLE_PROMPT to be on by default - Added some more magic to the Olympus section to make all the dependencies on the shell, cmdline editing, tab completion and friend work properly. - Tidied up the Olympus section with some whitespace. Checked the various scrips that parse through there and the extra whitespace shouldn't break anything.