commit bash-20151030 snapshot

This commit is contained in:
Chet Ramey
2015-11-02 10:50:13 -05:00
parent 07357ec296
commit 602edf7f20
9 changed files with 1040 additions and 1727 deletions
+24
View File
@@ -9866,3 +9866,27 @@ builtins/{set,ulimit}.def
builtins/*.def
- make sure to consistently use builtin_help() instead of mix of that
function and builtin_usage()
10/29
-----
doc/{bash.1,bashref.texi}
- BASH_CMDS, BASH_ALIASES: note that removing elements from these
array variables is not currently reflected in the command hash
table and alias list, respectively. Reported by isabella parakiss
<izaberina@gmail.com>
10/30
-----
eval.c
- reader_loop: if PS0 is set in an interactive shell, expand and display it
after reading a (complete) command but before executing it. This differs
from the DEBUG trap because the DEBUG trap is executed once for each
simple command (and some others, like each time through a for loop). From
a patch submitted by Dan Stromberg <dstromberglists@gmail.com>
parse.y
- prompt_again: set ps0_prompt from $PS0 in an interactive shell
doc/{bash.1,bashref.texi}
- PS0: document new prompt string
+23 -6
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Tue Oct 20 10:48:01 EDT 2015
.\" Last Change: Fri Oct 30 10:00:57 EDT 2015
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2015 October 20" "GNU Bash 4.4"
.TH BASH 1 "2015 October 30" "GNU Bash 4.4"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -1454,8 +1454,13 @@ that do not require \fBbash\fP to be re-initialized.
.B BASH_ALIASES
An associative array variable whose members correspond to the internal
list of aliases as maintained by the \fBalias\fP builtin.
Elements added to this array appear in the alias list; unsetting array
elements cause aliases to be removed from the alias list.
Elements added to this array appear in the alias list; however,
unsetting array elements currently does not cause aliases to be removed
from the alias list.
If
.B BASH_ALIASES
is unset, it loses its special properties, even if it is
subsequently reset.
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
@@ -1496,8 +1501,13 @@ builtin below)
.B BASH_CMDS
An associative array variable whose members correspond to the internal
hash table of commands as maintained by the \fBhash\fP builtin.
Elements added to this array appear in the hash table; unsetting array
elements cause commands to be removed from the hash table.
Elements added to this array appear in the hash table; however,
unsetting array elements currently does not cause command names to be removed
from the hash table.
If
.B BASH_ALIASES
is unset, it loses its special properties, even if it is
subsequently reset.
.TP
.B BASH_COMMAND
The command currently being executed or about to be executed, unless the
@@ -2328,6 +2338,13 @@ trailing directory components to retain when expanding the \fB\ew\fP and
.B PROMPTING
below). Characters removed are replaced with an ellipsis.
.TP
.B PS0
The value of this parameter is expanded (see
.SM
.B PROMPTING
(below) and displayed by interactive shells after reading a command
and before the command is executed.
.TP
.B PS1
The value of this parameter is expanded (see
.SM
+5 -1
View File
@@ -5403,7 +5403,6 @@ current directory.
A null directory name may appear as two adjacent colons, or as an initial
or trailing colon.
@item PS1
The primary prompt string. The default value is @samp{\s-\v\$ }.
@xref{Controlling the Prompt}, for the complete list of escape
@@ -5973,6 +5972,11 @@ trailing directory components to retain when expanding the @code{\w} and
@code{\W} prompt string escapes (@pxref{Controlling the Prompt}).
Characters removed are replaced with an ellipsis.
@item PS0
The value of this parameter is expanded like @var{PS1}
and displayed by interactive shells after reading a command
and before the command is executed.
@item PS3
The value of this variable is used as the prompt for the
@code{select} command. If this variable is not set, the
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2015 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Tue Oct 20 10:48:33 EDT 2015
@set LASTCHANGE Fri Oct 30 10:00:57 EDT 2015
@set EDITION 4.4
@set VERSION 4.4
@set UPDATED 20 October 2015
@set UPDATED 30 October 2015
@set UPDATED-MONTH October 2015
+17
View File
@@ -55,6 +55,7 @@ extern int last_command_exit_value, stdin_redir;
extern int need_here_doc;
extern int current_command_number, current_command_line_count, line_number;
extern int expand_aliases;
extern char *ps0_prompt;
#if defined (HAVE_POSIX_SIGNALS)
extern sigset_t top_level_mask;
@@ -160,6 +161,22 @@ reader_loop ()
executing = 1;
stdin_redir = 0;
/* If the shell is interactive, expand and display $PS0 after reading a
command (possibly a list or pipeline) and before executing it. */
if (interactive && ps0_prompt)
{
char *ps0_string;
ps0_string = decode_prompt_string (ps0_prompt);
if (ps0_string && *ps0_string)
{
fprintf (stderr, "%s", ps0_string);
fflush (stderr);
}
free (ps0_string);
}
execute_command (current_command);
exec_done:
+5
View File
@@ -232,6 +232,9 @@ char *secondary_prompt = SPROMPT;
/* PROMPT_STRING_POINTER points to one of these, never to an actual string. */
char *ps1_prompt, *ps2_prompt;
/* Displayed after reading a command but before executing it in an interactive shell */
char *ps0_prompt;
/* Handle on the current prompt string. Indirectly points through
ps1_ or ps2_prompt. */
char **prompt_string_pointer = (char **)NULL;
@@ -5225,6 +5228,8 @@ prompt_again ()
ps1_prompt = get_string_value ("PS1");
ps2_prompt = get_string_value ("PS2");
ps0_prompt = get_string_value ("PS0");
if (!prompt_string_pointer)
prompt_string_pointer = &ps1_prompt;
+482 -963
View File
File diff suppressed because it is too large Load Diff
+481 -754
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR