--- bash/bash/builtins/type.def:1.1.1.5 Sat Apr 5 00:00:28 2003
+++ bash/bash/builtins/type.def Mon Jul 19 12:07:33 2004
@@ -73,6 +73,7 @@
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,7 +359,8 @@
/* 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))
+ /* Don't report paths that would fail execution when
posixly_correct */
+ if (STREQ (full_path, command) || posixly_correct)
{
f = file_status (full_path);
if ((f & FS_EXECABLE) == 0)
@@ -368,7 +370,7 @@
if (all == 0)
break;
}
- else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC))
+ else if (!posixly_correct && (dflags &
(CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC)))