aboutsummaryrefslogtreecommitdiff
path: root/shell/msh.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add STANDALONE supportvapier2007-03-091-5/+73
| | | | git-svn-id: svn://busybox.net/trunk/busybox@18044 69ca8d6d-28ef-0310-b511-8ec308f3f277
* clean up accumulated whitespace damagevda2007-03-071-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@18020 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: fix my bugletvda2007-02-091-5/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17841 69ca8d6d-28ef-0310-b511-8ec308f3f277
* find: support for !vda2007-02-041-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17764 69ca8d6d-28ef-0310-b511-8ec308f3f277
* suppress warnings about easch <applet>_main() havingvda2007-02-031-0/+1
| | | | | | | no preceding prototype git-svn-id: svn://busybox.net/trunk/busybox@17740 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: cleaning up for -Wwrite-strings part #4vda2007-02-011-270/+287
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17692 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: cleaning up for -Wwrite-strings part #3vda2007-02-011-61/+57
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17691 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: cleaning up for -Wwrite-strings part #2vda2007-02-011-675/+648
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17690 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: cleaning up for -Wwrite-stringsvda2007-02-011-196/+236
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17689 69ca8d6d-28ef-0310-b511-8ec308f3f277
* preparatory patch for -Wwrite-strings #2vda2007-01-291-14/+14
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17654 69ca8d6d-28ef-0310-b511-8ec308f3f277
* cmdedit is not a 'command' editing anymore, it's just editing (generic),vda2007-01-221-14/+14
| | | | | | | so rename stuff accordingly. git-svn-id: svn://busybox.net/trunk/busybox@17451 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Convert cmdedit into more generic line input facilityvda2007-01-221-10/+16
| | | | | | | | | (make history and completion optional at runtime). Use it for fdisk, as an example. Some unrelated fixes in fdisk are also here. git-svn-id: svn://busybox.net/trunk/busybox@17446 69ca8d6d-28ef-0310-b511-8ec308f3f277
* stty: fix width of a field for ppc32vda2007-01-011-2/+5
| | | | | | | | sort: fix -u to match coreutils 6.3 msh: compile fix (my fault) git-svn-id: svn://busybox.net/trunk/busybox@17124 69ca8d6d-28ef-0310-b511-8ec308f3f277
* msh: double "static char line[LINELIM]" etc deleted.vda2007-01-011-87/+138
| | | | | | | | massive amounts of assignments-in-ifs deleted (some of which were VERY nasty) git-svn-id: svn://busybox.net/trunk/busybox@17123 69ca8d6d-28ef-0310-b511-8ec308f3f277
* random tiny size savingsvda2006-12-241-5/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17070 69ca8d6d-28ef-0310-b511-8ec308f3f277
* inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]vda2006-12-161-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16977 69ca8d6d-28ef-0310-b511-8ec308f3f277
* style cleanup: return(a) -> return a, part 2vda2006-11-271-139/+140
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16691 69ca8d6d-28ef-0310-b511-8ec308f3f277
* style cleanup: return(a) -> return a, part 1vda2006-11-271-89/+89
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16690 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rodata cleanup. "unable to" == "cannot". -300 bytesvda2006-11-181-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16580 69ca8d6d-28ef-0310-b511-8ec308f3f277
* remove duplicate flag declsvapier2006-11-151-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16534 69ca8d6d-28ef-0310-b511-8ec308f3f277
* silly size savings and capitalization fixesvda2006-10-261-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16438 69ca8d6d-28ef-0310-b511-8ec308f3f277
* add open_read_close() and similar stuffvda2006-10-141-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16377 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Make a warning go away when standalone shell is disabled.landley2006-08-101-9/+8
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15800 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A couple things that got tangled up in my tree, easier to check in both thanlandley2006-07-121-40/+1
| | | | | | | | | | | | | | | | | untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree. git-svn-id: svn://busybox.net/trunk/busybox@15687 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Get rid of all "#if 0" content.rpjday2006-07-011-44/+0
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15569 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove all usage of the "register" storage class specifier.rpjday2006-07-011-212/+207
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15568 69ca8d6d-28ef-0310-b511-8ec308f3f277
* dont setpgrp() for now as it breaks system() and that is more important than ↵vapier2006-06-261-4/+0
| | | | | | ctrl+c handling of background processes git-svn-id: svn://busybox.net/trunk/busybox@15519 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - convert old-style parameter declarations (K&R) to modern style.aldot2006-06-251-310/+151
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15511 69ca8d6d-28ef-0310-b511-8ec308f3f277
* assign default debug level to the MSHDEBUG definevapier2006-06-201-2/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15443 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.landley2006-06-141-2/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15381 69ca8d6d-28ef-0310-b511-8ec308f3f277
* make the default prompt suck less when using fancy promptsvapier2006-06-061-2/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15296 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - move #include busybox.h to the very top so we pull in the configaldot2006-06-021-1/+1
| | | | | | | and eventual platform specific includes in early. git-svn-id: svn://busybox.net/trunk/busybox@15267 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use xmalloc()vapier2006-06-021-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15263 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - use portability wrapper define bb_setpgrp.aldot2006-05-261-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15192 69ca8d6d-28ef-0310-b511-8ec308f3f277
* didnt mean to commit debug enablevapier2006-05-051-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15014 69ca8d6d-28ef-0310-b511-8ec308f3f277
* use %p when printing pointers, not %xvapier2006-05-051-52/+54
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15013 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix Bug 659 as reported by Robin Getzvapier2006-05-051-0/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15011 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionlandley2006-03-061-1/+1
| | | | | | | definitions. (That should only be on prototypes.) git-svn-id: svn://busybox.net/trunk/busybox@14457 69ca8d6d-28ef-0310-b511-8ec308f3f277
* moved BB_BANNER to applets/version.c file: make kernel like version, vodz2006-02-161-2/+2
| | | | | | removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h git-svn-id: svn://busybox.net/trunk/busybox@14080 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix up yet more annoying signed/unsigned and mixed type errorsandersen2006-01-301-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13732 69ca8d6d-28ef-0310-b511-8ec308f3f277
* just whitespacetimr2006-01-251-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@13584 69ca8d6d-28ef-0310-b511-8ec308f3f277
* data --> textvodz2005-10-171-7/+7
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11881 69ca8d6d-28ef-0310-b511-8ec308f3f277
* usage bb_dev_nullvodz2005-10-121-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11846 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reduce exported from msh appletvodz2005-09-221-5/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11580 69ca8d6d-28ef-0310-b511-8ec308f3f277
* applyinf fix for:pgf2005-07-201-1/+1
| | | | | | | | 0000155: variable expansion with braces in backticks in msh git-svn-id: svn://busybox.net/trunk/busybox@10876 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Jonas Holmberg from axis dot com writes:andersen2004-09-021-22/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes msh handle variable expansion within backticks more correctly. Current behaviour (wrong): -------------------------- BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. $ A='`echo hello`' $ echo $A `echo hello` $ echo `echo $A` hello $ New behaviour (correct): ------------------------ BusyBox v1.00-rc3 (2004.08.26-11:51+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. $ A='`echo hello`' $ echo $A `echo hello` $ echo `echo $A` `echo hello` $ The current behaviour (wrong according to standards) was actually my fault. msh handles backticks by executing a subshell (which makes it work on MMU-less systems). Executing a subshell makes it hard to only expand variables once in the parent. Therefore I export all variables that will be expanded within the backticks and let the subshell handle the expansion instead. The bug was found while searching for security leaks in CGI-scripts. Current behaviour of msh makes it easy to expand backticks by mistake in $QUERY_STRING. I recommend appling the patch before release of bb 1.00. /Jonas git-svn-id: svn://busybox.net/trunk/busybox@9199 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Quiet a few warningsandersen2004-08-271-19/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9179 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Michael Leibow, MichaelLe at belkin.com writes:andersen2004-08-041-375/+1056
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A question was posted a month ago by Mark Alamo to see if others had problems with sourcing subscripts within msh. We asked his firm to fix the msh.c bug he described because we didn't have enough time to do it ourselves. When msh.c is executing a compound statement and there is a . command to source another script file, msh.c will not execute the subscript until it's completed executing the rest of the compound statement. His example was this: Echo "Start" ; . ./subA; echo "mid" ; . ./subB ; echo "end" subA and subB execute AFTER end is printed in reverse order. The same is true if the sourced files are inside an if else fi, case esac, or any compound statement. Attached is a patch to msh.c. It fixes the problem. Cd to the root of your busybox tree and execute "patch -p1 < msh.c.patch" Unfortunately, I won't have more time to work on this so I hope that there aren't any problems! Michael Leibow Senior Software Engineer Belkin Corporation git-svn-id: svn://busybox.net/trunk/busybox@9062 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Run msh through indentandersen2004-08-041-1313/+1164
| | | | git-svn-id: svn://busybox.net/trunk/busybox@9061 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277