commit bash-20160318 snapshot

This commit is contained in:
Chet Ramey
2016-03-30 10:55:33 -04:00
parent f1b255b12b
commit 4dd820b40a
4 changed files with 24 additions and 7 deletions
+11
View File
@@ -10565,3 +10565,14 @@ lib/readline/readline.h
lib/readline/doc/rltech.texi
- rl_clear_visible_line: add documentation
3/19
----
findcmd.c
- file_status: add inadvertently-dropped test for EXECIGNORE to the
`other' bits check. The check was in the original patch
- search_for_command: if the file should not be considered executable
because it's in the EXECIGNORE blacklist, don't set file_to_lose_on,
since the attempt to execute the last-ditch path will circumvent the
EXECIGNORE setting. Fixes bug reported by Dennis Williamson
<dennistwilliamson@gmail.com>
+5 -2
View File
@@ -2014,11 +2014,14 @@ used when the shell is invoked in POSIX mode.
.TP
.B EXECIGNORE
A colon-separated list of shell patterns (see \fBPattern Matching\fP)
defining the list of filenames to be ignored by command search.
defining the list of filenames to be ignored by command search using
\fBPATH\fP.
Files whose full pathnames match one of these patterns are not considered
executable files for the purposes of completion and command execution.
executable files for the purposes of completion and command execution
via \fBPATH\fP lookup.
This does not affect the behavior of the \fB[\fP, \fBtest\fP, and \fB[[\fP
commands.
Full pathnames in the command hash table are not subject to \fBEXECIGNORE\fP.
Use this variable to ignore shared library files that have the executable
bit set, but are not executable files.
The pattern matching honors the setting of the \fBextglob\fP shell
+6 -3
View File
@@ -3801,7 +3801,7 @@ unset [-fnv] [@var{name}]
Remove each variable or function @var{name}.
If the @option{-v} option is given, each
@var{name} refers to a shell variable and that variable is remvoved.
@var{name} refers to a shell variable and that variable is removed.
If the @option{-f} option is given, the @var{name}s refer to shell
functions, and the function definition is removed.
If the @option{-n} option is supplied, and @var{name} is a variable with
@@ -5723,11 +5723,14 @@ is readonly.
@item EXECIGNORE
A colon-separated list of shell patterns (@pxref{Pattern Matching})
defining the list of filenames to be ignored by command search.
defining the list of filenames to be ignored by command search using
@code{PATH}.
Files whose full pathnames match one of these patterns are not considered
executable files for the purposes of completion and command execution.
executable files for the purposes of completion and command execution
via @code{PATH} lookup.
This does not affect the behavior of the @code{[}, @code{test}, and @code{[[}
commands.
Full pathnames in the command hash table are not subject to @code{EXECIGNORE}.
Use this variable to ignore shared library files that have the executable
bit set, but are not executable files.
The pattern matching honors the setting of the @code{extglob} shell
+2 -2
View File
@@ -189,7 +189,7 @@ file_status (name)
/* Else we check whether `others' have permission to execute the file */
else
{
if (finfo.st_mode & S_IXOTH)
if (exec_name_should_ignore (name) == 0 && finfo.st_mode & S_IXOTH)
r |= FS_EXECABLE;
if (finfo.st_mode & S_IROTH)
r |= FS_READABLE;
@@ -568,7 +568,7 @@ find_in_path_element (name, path, flags, name_len, dotinfop)
/* The file is not executable, but it does exist. If we prefer
an executable, then remember this one if it is the first one
we have found. */
if ((flags & FS_EXEC_PREFERRED) && file_to_lose_on == 0)
if ((flags & FS_EXEC_PREFERRED) && file_to_lose_on == 0 && exec_name_should_ignore (full_path) == 0)
file_to_lose_on = savestring (full_path);
/* If we want only executable files, or we don't want directories and