4f6753e586
Cope gracefully when people type something, then hit ^C. -Erik
Eric Andersen
2001-05-31 17:17:12 +00:00
4f990533e3
Patch from Vladimir to fix up autocompletion on a files/dirs with spaces in them in the presence of a quoting. Also revert my signal handling patch, which seems to not solve the problem I thought it solved.
Eric Andersen
2001-05-31 17:15:57 +00:00
f12cc4ee68
Make hush the default shell. Ensure the applets_list gets the axe on a distclean.
Eric Andersen
2001-05-30 19:09:40 +00:00
86f0167e39
grep failed to compile when BB_FEATURE_CLEAN_UP was defined -- types were wrong.
Eric Andersen
2001-05-29 22:36:39 +00:00
6e9e136fcb
Use safe_strncpy.
Matt Kraai
2001-05-27 14:11:52 +00:00
4f6aea807b
More shell / quoting testcases from Larry.
Mark Whitley
2001-05-24 23:05:13 +00:00
8b7a0d807a
Some more patchelttes from Larry Doolittle.
Mark Whitley
2001-05-24 21:31:09 +00:00
0a4f578fdc
'Nother patch from Larry to fix a buglet in how the line gets sed-ified. Also, more testcases and comments on bugs and formatting differences in some of the testcases.
Mark Whitley
2001-05-24 21:24:39 +00:00
fa43e54b6f
Added support for grep -e and grep -f, closes bug #1164. Also added some testcases for these new features.
Mark Whitley
2001-05-24 18:36:18 +00:00
04052f96e1
Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid a bash2-ism and quote variables that contain strings.
Mark Whitley
2001-05-24 17:15:33 +00:00
a813afc24f
Plug another memory leak
Eric Andersen
2001-05-24 16:19:36 +00:00
5a9d441b2c
Fix up some signed char vs int issues that show up on powerpc.
Eric Andersen
2001-05-24 14:16:28 +00:00
1c1f5d3047
Get BB_LASH out of the list...
Eric Andersen
2001-05-24 14:11:09 +00:00
a15dc15f12
Plug another memory leak in hush. This one showed up when backticked commands were run. This one was sure a bugger to find. -Erik
Eric Andersen
2001-05-23 23:46:09 +00:00
bf7df04ec1
Fix a massive memory leak in the run_list_test() function. Rename run_list_test() as free_pipe_list(). Rename run_pipe_test() as free_pipe(). -Erik
Eric Andersen
2001-05-23 22:18:35 +00:00
77d9268892
Patch from larry to fix some grammar errors.
Eric Andersen
2001-05-23 20:32:09 +00:00
bdd4eced84
Commit a patch by Larry Doolittle which fixes recursive calls to file_peek, and improves some debugging messages.
Matt Kraai
2001-05-23 17:43:00 +00:00
774d135b66
Make more robust (patch by Larry Doolittle).
Matt Kraai
2001-05-23 14:45:09 +00:00
3200f5ac68
It turns out the descriptions of both dos2unix and unix2dos were broken. This fixes. -Erik
Eric Andersen
2001-05-22 22:39:10 +00:00
57e6a49e5b
Excellent. This patch from Larry fixes the behavior of hush when builtins are included in pipes.
Eric Andersen
2001-05-22 22:34:51 +00:00
9978576f15
Fix this case. No, really this time. unset FOO export FOO=bar FOO=baz echo "global env: " env | grep ^FOO echo "local env: " set | grep ^FOO -Erik
Eric Andersen
2001-05-22 21:37:48 +00:00
aeb44c4da6
Fix a race. Sometimes by the time we got to checkjobs(), the pipe struct had already been freed. Return immediately if the pipe is NULL.
Eric Andersen
2001-05-22 20:29:00 +00:00
816867858b
Oops. Remove some debug noise I left in.
Eric Andersen
2001-05-22 19:23:35 +00:00
94ac244dea
Updates from both Vladimir and Larry
Eric Andersen
2001-05-22 19:05:18 +00:00
1eb4acfc23
Fixed misnamed rewind command (noted by Tom Oehser).
Matt Kraai
2001-05-22 14:32:35 +00:00
edc806507c
Fixed extra -- lines (noted by Christophe Boyanique).
Matt Kraai
2001-05-22 14:29:27 +00:00
117231c44f
Make - read compressed data from stdin (thanks to Marius Groeger).
Matt Kraai
2001-05-22 14:23:02 +00:00
7f7348b7b2
Correctly remove leading slashes upon extraction (thanks to Marius Groeger).
Matt Kraai
2001-05-22 14:18:03 +00:00
1d9d41150b
Fixed mishandling of -c & -l options and accounted for case when we're grepping only one file.
Mark Whitley
2001-05-21 21:13:00 +00:00
004015e9c4
Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bug #1130 (i.e. When you turn on features it should always ADD features)
Eric Andersen
2001-05-21 20:30:51 +00:00
abec344ab7
A couple more minor touchups
Eric Andersen
2001-05-21 17:58:01 +00:00
317827d9e5
Several cleanups for usage messages
Eric Andersen
2001-05-21 17:50:53 +00:00
73991ff925
Fix tell support.
Matt Kraai
2001-05-21 17:01:32 +00:00
ada18ff0f5
The latest patch from Larry
Eric Andersen
2001-05-21 16:18:22 +00:00
8ae319a322
This patch from Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de> is based on the work of Jinux Kim on his "babobox" (derived from busybox-0.42), and enables kernel module loading and unloading for uClinux/m68k.
Eric Andersen
2001-05-21 16:09:18 +00:00
2f6e1f880b
Patch from Gernot Poerner <gp@it-netservice.de>. Adds in mount bind support.
Eric Andersen
2001-05-21 15:59:34 +00:00
13a70ac2ab
Fix open mode for IOCTLs which write to the tape.
Matt Kraai
2001-05-21 15:00:39 +00:00
9ffb7dd9a4
This is a patch from Vladimir:
Eric Andersen
2001-05-19 03:00:46 +00:00
6197c51834
Fix an escape problem in the docs. Some \n's didn't have the '\' escaped, and so were messsing the out output. -Erik
Eric Andersen
2001-05-18 23:14:53 +00:00
b6967635eb
(Almost) brand-new version of cut that supports muitiple lists of positions, per feature request from Tom Oehser.
Mark Whitley
2001-05-18 23:04:51 +00:00
1844770fec
Changed snprintf copies to use strncpy at the suggestion of Aaron Lehmann.
Matt Kraai
2001-05-18 21:24:58 +00:00
d6ef07406d
Rewrote copyfd to use library functions, terminate, and copy correct data.
Matt Kraai
2001-05-18 14:14:55 +00:00
6943815400
Fix applet_name.
Matt Kraai
2001-05-17 20:40:21 +00:00
231f998aba
Switch from hstrerror to herror for libc5 systems.
Matt Kraai
2001-05-17 14:19:05 +00:00
7cedac567c
Remove unused function. If necessary, we can use remove_file instead.
Matt Kraai
2001-05-17 04:03:22 +00:00
bc0f783a5f
Fix invocation of builtin shell to have proper argc and argv.
Matt Kraai
2001-05-17 03:54:37 +00:00
233817437d
Always print a newline after a matching substitution.
Matt Kraai
2001-05-17 01:02:58 +00:00
bfae2529b8
It turns out job control in both hush and lash was broken by the signal handling in cmdedit.c. Disabling it makes the shells behave themselves again. hush isn't quite there, but is getting close... -Erik
Eric Andersen
2001-05-17 00:14:27 +00:00
2439a59828
Remove/replace the "div" call.
Eric Andersen
2001-05-16 18:53:34 +00:00
8f7a4ad442
Add missing include, noted by Larry Doolittle.
Matt Kraai
2001-05-16 17:05:03 +00:00
bf381a0ad8
Whoops. Forgot the x.
Matt Kraai
2001-05-16 15:52:23 +00:00
c55b8d41c1
Add xgethostbyname and herror_msg* functions.
Matt Kraai
2001-05-16 15:40:51 +00:00
59df6f7398
Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c by Larry Doolittle.
Matt Kraai
2001-05-16 14:21:09 +00:00
bc604a2f41
Move init of a bunch of globals into main so we are at least a bit more reentrant. -Erik
Eric Andersen
2001-05-16 05:24:03 +00:00
f72f562b2f
Fix the behavior of local shell variables to match that of bash and ash. -Erik
Eric Andersen
2001-05-15 23:21:41 +00:00
9abfe85e96
Suggestion from Larry: no format string, use fputs instead.
Eric Andersen
2001-05-15 20:11:49 +00:00
50ae3102fb
Patch from Adam Heath <doogie@debian.org> to add arbitrary header support to wget, so it can now do funky interactive things with cgi scripts.
Eric Andersen
2001-05-15 17:51:37 +00:00
55f9872616
This patch from Adam Heath <doogie@debian.org>, makes print_file (used by cat, grep, sed, etc) quite a bit faster.
Eric Andersen
2001-05-15 17:48:09 +00:00
c911a4389b
Patch from Vladimir: 1) fixed a bug that could crash df, mount, and umount applets if the root device name was longer then the word "root" (/dev/loop1 vs /dev/root) - 2) severl functions needed static declaration in the umount applet 3) update declaration for function in last_char_is() in libbb
Eric Andersen
2001-05-15 17:42:16 +00:00
15649c11f3
Oops. I left in some debug noise.
Eric Andersen
2001-05-15 17:28:26 +00:00
20a69a77d2
Write set_local_var() and fixup lookup_param() so you can now use shell local variables. -Erik
Eric Andersen
2001-05-15 17:24:44 +00:00
78a7c99f7f
This patch covers one big part of variable handling. $ 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.
Eric Andersen
2001-05-15 16:30:25 +00:00
be9f44a7df
Fix incorrect length passed to accept noted by Larry Doolittle.
Matt Kraai
2001-05-15 03:05:39 +00:00
336480fe6f
Added some testcases for grep and sed (many more could still be added)
Mark Whitley
2001-05-14 21:18:54 +00:00
d928accbbd
...Need to print just a few more newlines.
Mark Whitley
2001-05-14 20:44:26 +00:00
2416dfc3c9
A compromise solution for insmod
Eric Andersen
2001-05-14 20:03:04 +00:00
dd527d3c62
...And now that we're chomping lines, we need to re-add the newline later...
Mark Whitley
2001-05-14 19:53:08 +00:00
9de2659264
We will chomp() lines so REG_NEWLINE does not break stuff. Thanks, Matt.
Mark Whitley
2001-05-14 19:44:44 +00:00
35e59bed97
Fixed a subtle bug in the handling of -l and -c flags.
Mark Whitley
2001-05-14 19:40:32 +00:00
452cc1f293
Added REG_NEWLINE as cflags to xregcomp for normal addresses so EOL $ will work
Mark Whitley
2001-05-14 19:23:02 +00:00
9496466044
Follow symbolic links when searching for modules.
Matt Kraai
2001-05-14 18:27:25 +00:00
14d354312a
Per suggestion from Vladimir, eliminate check_wildcard_match(), which was only being used by insmod these days.
Eric Andersen
2001-05-14 17:07:32 +00:00
cb378a5267
Add missing periods and delete superfluous whitespace.
Matt Kraai
2001-05-14 06:35:15 +00:00
a17b3631fe
Do not ever change permissions on existing directories, only on directories we created while extracting a tarball. Fix based on bug report and patch from Konstantin Boldyshev <konst@linuxassembly.org> -Erik
Eric Andersen
2001-05-13 15:39:30 +00:00
95a349f427
When doing a 'wget -O -' turn on the quiet flag, lest the status bar noise get mingled with the retrieved webpage. -Erik
Eric Andersen
2001-05-13 00:55:54 +00:00
ddb00545b7
A patch from Aaron Lehmann <aaronl@vitelus.com> to fix a crash on a broken regexp.
Eric Andersen
2001-05-13 00:48:09 +00:00
4819c3d477
Make the locale stuff only do the getpid==1 check if BB_INIT is defined
Eric Andersen
2001-05-13 00:33:16 +00:00
1f3b9f297e
Added support for 'r' command in sed.
Mark Whitley
2001-05-11 22:27:13 +00:00
cfa88ecb72
Fix up some silly warnings
Eric Andersen
2001-05-11 18:08:16 +00:00
5f265b755a
Fix a segfault in lash, hush, and cmdedit. Each of these used 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
Eric Andersen
2001-05-11 16:58:46 +00:00
9d94deabd3
Use xgetcwd
Eric Andersen
2001-05-11 16:36:03 +00:00
238da24620
Fix the chown usage text, also thanks to Lars Kellogg-Stedman <lars@larsshack.org>
Eric Andersen
2001-05-11 16:31:46 +00:00
2b02ab9606
This patch from Lars Kellogg-Stedman, fixes the behavior of chown to be consistant with GNU chown, so that it follows symlinks (who cares about the perms on a link anyways?) unless the -h option is supplied. -Erik
Eric Andersen
2001-05-11 15:55:41 +00:00
eb5f433736
Check that putenv succeeded, suggested by Jonas Holmberg.
Matt Kraai
2001-05-11 15:16:28 +00:00
c96381be40
Fix env usage information.
Matt Kraai
2001-05-11 14:28:17 +00:00
5b44f48afc
Fix handling of '-' option and way that variables are added to the environment from Jonas Holmberg <jonas.holmberg@axis.com>. Fix handling of command options by adding + to getopt string.
Matt Kraai
2001-05-11 14:26:29 +00:00
f3e79ba6e3
Fix symlink removal problem noted by Erik Andersen.
Matt Kraai
2001-05-11 02:35:36 +00:00
6e91f69a0d
Add installation instructions from Tomas Pospisek <tpo_hp@sourcepole.ch>.
Matt Kraai
2001-05-10 14:12:20 +00:00
854125f6e6
Make stdio functions which can be interrupted by the progressmeter timer recover gracefully from EINTR.
Matt Kraai
2001-05-09 19:15:46 +00:00
d283e1cfe9
Bump version to 0.52pre
Eric Andersen
2001-05-09 17:31:27 +00:00
1a6d39b259
A few more structural updates for job control. -Erik
Eric Andersen
2001-05-08 05:11:54 +00:00
0a36de0580
Fix a stupid segfault caused by dereferencing a NULL ptr. -Erik
Eric Andersen
2001-05-08 04:25:46 +00:00
45e92ba2ce
This patch from Evin Robertson <nitfol@my-deja.com> fixes export so it works. This way leaks memory, but oh well. We will probably fix that when we get around to doing local variables.
Eric Andersen
2001-05-07 23:53:09 +00:00
8cd16d8fd3
This syncs things with Vladimir's latest patches. Also gets rid of useless 'const int' declarations. -Erik
Eric Andersen
2001-05-07 23:11:23 +00:00
186bf1defc
This is Vladimir's update to last_char_is(). Since 'char *' is the least common denominator, I modified it to use that (not const), which will minimize the need for casting elsewhere.
Eric Andersen
2001-05-07 23:10:16 +00:00
de0ca0cd9e
Silence cut so it doesn't whine during compilation
Eric Andersen
2001-05-07 23:07:17 +00:00
f3f9f3efa7
A patch from Vladimir to simplify chomp()
Eric Andersen
2001-05-07 23:02:39 +00:00
4ad13e5d95
A patch from Vladimir to simplify concat_path_file() and make it less likely to break.
Eric Andersen
2001-05-07 23:01:32 +00:00
c33ebc9741
A patch from Vladimir to use last_char_is(), and a patch from Larry to fix a silly bug when BB_FEATURE_VI_OPTIMIZE_CURSOR is not defined.
Eric Andersen
2001-05-07 22:57:47 +00:00
04b0354d8e
Patch from Vladimir to use last_char_is to simplify du.c
Eric Andersen
2001-05-07 22:49:43 +00:00