*** bash/bash/builtins/type.def:1.1.1.5 Sat Apr 5 00:00:28 2003
--- bash/bash/builtins/type.def Thu Jul 29 15:51:27 2004
***************
*** 73,78 ****
--- 73,79 ----
extern int find_reserved_word __P((char *));
extern char *this_command_name;
+ extern int posixly_correct;
/* For each word in LIST, find out what the shell is going to do with
it as a simple command. i.e., which file would this shell use to
***************
*** 358,364 ****
/* If we found the command as itself by looking through $PATH,
it
probably doesn't exist. Check whether or not the command is an
executable file. If it's not, don't report a match. */
! if (STREQ (full_path, command))
{
f = file_status (full_path);
if ((f & FS_EXECABLE) == 0)
--- 359,365 ----
/* If we found the command as itself by looking through $PATH,
it
probably doesn't exist. Check whether or not the command is an
executable file. If it's not, don't report a match. */
! if (STREQ (full_path, command) || posixly_correct)
{
f = file_status (full_path);
if ((f & FS_EXECABLE) == 0)
***************
*** 367,375 ****
full_path = (char *)NULL;
if (all == 0)
break;
! }
! else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC))
! full_path = sh_makepath ((char *)NULL, full_path, MP_DOCWD);
}
found_file++;
--- 368,378 ----
full_path = (char *)NULL;
if (all == 0)
break;
! }
! /* command -V must emit an absolute path for POSIX */
! else if ((STREQ (full_path, command) || !ABSPATH(full_path)) &&
! (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC)))