| Summary: | /bin/sh `type' builtin bug | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | David Holland <dholland> | ||||
| Component: | bin | Assignee: | Martin Cracauer <cracauer> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.0-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
David Holland
2000-08-12 20:00:03 UTC
> --- exec.c.dist Sat Aug 12 14:42:28 2000 > +++ exec.c Sat Aug 12 14:44:06 2000 > @@ -884,7 +884,11 @@ > entry.cmdtype = cmdp->cmdtype; > entry.u = cmdp->param; > } > - else { > + else if (argv[i][0]=='/') { > + /* Absolute path. */ > + out1fmt(" is %s\n", argv[i]); > + continue; > + } else { > /* Finally use brute force */ > find_command(argv[i], &entry, 0, pathval()); > } This is still wrong (although not as wrong as it currently is) as ``type /x'' returns ``/x'' rather than ``/x not found''. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! > > --- exec.c.dist Sat Aug 12 14:42:28 2000
> > +++ exec.c Sat Aug 12 14:44:06 2000
> > @@ -884,7 +884,11 @@
> > entry.cmdtype = cmdp->cmdtype;
> > entry.u = cmdp->param;
> > }
> > - else {
> > + else if (argv[i][0]=='/') {
> > + /* Absolute path. */
> > + out1fmt(" is %s\n", argv[i]);
> > + continue;
> > + } else {
> > /* Finally use brute force */
> > find_command(argv[i], &entry, 0, pathval());
> > }
>
> This is still wrong (although not as wrong as it currently is) as
> ``type /x'' returns ``/x'' rather than ``/x not found''.
Oops. I knew I was forgetting something...
--
- David A. Holland | VINO project home page:
dholland@eecs.harvard.edu | http://www.eecs.harvard.edu/vino
Responsible Changed From-To: freebsd-bugs->cracauer Over to the maintainer. State Changed From-To: open->closed Fixed in -current. Fix will be merged into 4-stable soon. |