pk
0b9acf16f8
Return zero status if `else' clause is empty.
1996-03-06 14:49:29 +00:00
christos
b09ffc42b1
- parser.c: Fix prompting in old style backquote expansion. Fixes PR/2139
...
and many user complaints why the shell hangs in echo "`"
- eval.c: Fix exitstatus invalid resetting in `if' statements were:
if (exit 3); then
echo foo $?
else
echo bar $?
fi
printed 'bar 0' instead of bar 3
1996-03-05 21:03:52 +00:00
christos
f9382bca1a
Fix return builtin to work like it does in ksh:
...
When not in a function, it skips the rest of the current input file.
Instances of `return' outside function definitions were previously ignored.
What does joe posix have to say about this?
[fixes PR/1444]
1995-09-11 17:05:41 +00:00
christos
a45947b2a4
Changed so that 'PATH=newpath command' works, instead of looking at the
...
old path. Synced input.c with vangogh.
1995-06-09 01:53:44 +00:00
christos
4fb6f609aa
Changed so that syntax errors (EXERROR) set the exit status to 2,
...
and commands that are not found set the exit status to 1 like all
other bourne shells.
[It used to be 0 and 2 respectively]
1995-05-19 15:08:55 +00:00
cgd
b5f33fc18e
re-add an #endif that was (apprently) clobbered.
1995-05-15 03:29:54 +00:00
christos
fbac2e9de2
Fixed new bug the previous fix introduced:
...
false
foo=bar
echo $?
would print 1
Also fixed the long standing bug:
false
echo `echo $?`
would print 0
The exitstatus needs rethinking and rewriting. The trial and error method
is not very efficient
1995-05-15 02:47:38 +00:00
christos
2e1970487e
Fixed bug caused by previous x=`false` not preserving the exit status fix.
...
The if statement exit status broke...
1995-05-14 04:19:18 +00:00
christos
07bae7eddd
Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
...
bug.
1995-05-11 21:28:33 +00:00
christos
df504509f1
1. Don't core dump on 'fc -l' (From Gerard J van der Grinten)
...
2. PATH=xxx ls, does the PATH assignment first and then tries to find ls in xxx
3. VAR=xxx exec ls, does the variable assignment.
1995-03-31 21:58:09 +00:00
cgd
49f0ad8601
convert to new RCS id conventions.
1995-03-21 09:01:59 +00:00
cgd
58f1733118
be more careful with casts.
1994-12-23 13:24:39 +00:00
cgd
4ce0d34a31
clean up further. more patches from Jim Jegers
1994-12-05 19:07:32 +00:00
cgd
5dad143982
from James Jegers <jimj@miller.cs.uwm.edu>: quiet -Wall, and squelch
...
some of the worst style errors.
1994-12-04 07:11:37 +00:00
mycroft
08a6730054
Fix a core dump and another parse error related to null commands.
1994-08-24 05:48:26 +00:00
jtc
918ce04f57
From Christos:
...
1. Fix `-' quoting in [ ] expressions.
2. Fix expansion of variables in redirections
1994-06-14 05:49:19 +00:00
jtc
212ba62f56
Set the status variable ($?) to 0 after a successful variable assignment.
1994-06-12 02:31:28 +00:00
mycroft
cafd1f7e9f
Add RCS ids.
1994-06-11 16:11:35 +00:00
cgd
242337bcae
a few more things to omit when NO_HISTORY defined. from noel@cs.oberlin.edu
1994-05-21 01:42:30 +00:00
cgd
e3c63ad9f3
add back in support for building w/o obj dir. also, add NO_HISTORY
...
define, which (if you invoke mkbuiltins properly) gets you a sh w/o
history of command line editing (for floppy sh).
1994-05-14 22:20:04 +00:00
jtc
a81e412494
Include appropriate header files to bring function prototypes into scope.
1994-05-12 17:03:32 +00:00
jtc
542ace3bab
reintegrate NetBSD's false builtin
1994-05-11 17:42:57 +00:00
jtc
37ed7877b2
sync with 4.4lite
1994-05-11 17:09:42 +00:00
cgd
7ca06a9522
fix from Jim Wilson <wilson@cygnus.com> for nothing-between-backquotes core
1993-09-09 01:05:19 +00:00
mycroft
8542364e07
Add RCS identifiers.
1993-08-01 18:49:50 +00:00
jtc
67893cfee5
IEEE 1003.2 (D11.2.2.3) requires that the system's true and false be accessed
...
instead of searching $PATH. The best way to satisfy this requirement is to
make them builtins.
True was allready builtin, this patch adds false.
1993-07-07 01:11:56 +00:00
cgd
06be60083d
changed "Id" to "Header" for rcsids
1993-03-23 00:22:59 +00:00
cgd
346aa5dd48
added rcs ids to all files
1993-03-22 08:04:00 +00:00
cgd
61f282557f
initial import of 386bsd-0.1 sources
1993-03-21 09:45:37 +00:00