mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 16:39:53 +02:00
commit bash-20200504 snapshot
This commit is contained in:
@@ -8288,3 +8288,62 @@ subst.c
|
||||
terminal's process group, remove the code that tries to clean up
|
||||
after that
|
||||
|
||||
5/4
|
||||
---
|
||||
doc/bash.1
|
||||
- make sure to mention /etc/inputrc as the ultimate default readline
|
||||
init file, like other documentation does. Update from
|
||||
Greg Price <gnprice@gmail.com>
|
||||
|
||||
lib/readline/readline.c
|
||||
- if the private startup hook function variable _rl_internal_startup_hook
|
||||
is set, execute that after any user-specified startup hook
|
||||
|
||||
lib/readline/rlprivate.h
|
||||
- _rl_internal_startup_hook: new extern declaration
|
||||
|
||||
bashline.c,lib/readline/{misc.c,readline.h}
|
||||
- operate_and_get_next: moved to rl_operate_and_get_next so it's
|
||||
available to all readline programs, uses _rl_internal_startup_hook.
|
||||
Based on patch from Greg Price <gnprice@gmail.com>
|
||||
|
||||
lib/readline/funmap.c
|
||||
- "operate-and-get-next": now a bindable readline command
|
||||
|
||||
lib/readline/emacs_keymap.c
|
||||
- rl_operate_and_get_next: bound to ^O in emacs mode by default
|
||||
|
||||
doc/bash.1,lib/readline/{readline.3,rluser.texi}
|
||||
- operate-and-get-next: move to readline section of the manuals, out of
|
||||
bash-specific functions section
|
||||
|
||||
5/5
|
||||
---
|
||||
hashlib.c
|
||||
- hash_string: use a series of shifts and adds to avoid a multiply by
|
||||
FNV_PRIME. From Landon Curt Noll's FNV web page
|
||||
|
||||
builtins/fc.def
|
||||
- fc_gethist,fc_gethnum: now take an additional argument indicating the
|
||||
operating mode: if the arg is 1, fc is listing commands; if it is 0,
|
||||
fc is executing commands. Affects how -0 is handled (fc_gethnum
|
||||
returns -1). Changed callers to handle the return value appropriately.
|
||||
Report from Jason Franklin <jason.franklin@quoininc.com> about
|
||||
seg fault and core dump
|
||||
- fc_builtin: if fc_gethnum returns < 0 when setting histbeg or histend,
|
||||
report a range error
|
||||
|
||||
doc/bash.1,lib/readline/doc/hsuser.texi
|
||||
- fc: document how 0 and -0 are treated for listing and executing
|
||||
|
||||
shell.c
|
||||
- run_one_command: call parse_and_execute with SEVAL_RESETLINE so the
|
||||
line number gets set to 1. Reported by Rob Landley <rob@landley.net>
|
||||
|
||||
5/8
|
||||
---
|
||||
support/config.{guess,sub}
|
||||
- update to latest versions
|
||||
|
||||
configure.ac
|
||||
- add support for `genode' from Emery Hemingway <ehmry@posteo.net>
|
||||
|
||||
@@ -1142,6 +1142,7 @@ tests/history1.sub f
|
||||
tests/history2.sub f
|
||||
tests/history3.sub f
|
||||
tests/history4.sub f
|
||||
tests/history5.sub f
|
||||
tests/ifs.tests f
|
||||
tests/ifs.right f
|
||||
tests/ifs1.sub f
|
||||
|
||||
-40
@@ -118,7 +118,6 @@ extern int tputs PARAMS((const char *string, int nlines, int (*outx)(int)));
|
||||
/* Functions bound to keys in Readline for Bash users. */
|
||||
static int shell_expand_line PARAMS((int, int));
|
||||
static int display_shell_version PARAMS((int, int));
|
||||
static int operate_and_get_next PARAMS((int, int));
|
||||
|
||||
static int bash_ignore_filenames PARAMS((char **));
|
||||
static int bash_ignore_everything PARAMS((char **));
|
||||
@@ -479,7 +478,6 @@ initialize_readline ()
|
||||
/* Backwards compatibility. */
|
||||
rl_add_defun ("insert-last-argument", rl_yank_last_arg, -1);
|
||||
|
||||
rl_add_defun ("operate-and-get-next", operate_and_get_next, -1);
|
||||
rl_add_defun ("display-shell-version", display_shell_version, -1);
|
||||
rl_add_defun ("edit-and-execute-command", emacs_edit_and_execute_command, -1);
|
||||
|
||||
@@ -517,7 +515,6 @@ initialize_readline ()
|
||||
rl_bind_key_if_unbound_in_map ('^', history_expand_line, emacs_meta_keymap);
|
||||
#endif
|
||||
|
||||
rl_bind_key_if_unbound_in_map (CTRL ('O'), operate_and_get_next, emacs_standard_keymap);
|
||||
rl_bind_key_if_unbound_in_map (CTRL ('V'), display_shell_version, emacs_ctlx_keymap);
|
||||
|
||||
/* In Bash, the user can switch editing modes with "set -o [vi emacs]",
|
||||
@@ -920,43 +917,6 @@ hostnames_matching (text)
|
||||
return (result);
|
||||
}
|
||||
|
||||
/* The equivalent of the Korn shell C-o operate-and-get-next-history-line
|
||||
editing command. */
|
||||
static int saved_history_logical_offset = -1;
|
||||
|
||||
#define HISTORY_FULL() (history_is_stifled () && history_length >= history_max_entries)
|
||||
|
||||
static int
|
||||
set_saved_history ()
|
||||
{
|
||||
int absolute_offset, count;
|
||||
|
||||
if (saved_history_logical_offset >= 0)
|
||||
{
|
||||
absolute_offset = saved_history_logical_offset - history_base;
|
||||
count = where_history () - absolute_offset;
|
||||
rl_get_previous_history (count, 0);
|
||||
}
|
||||
saved_history_logical_offset = -1;
|
||||
rl_startup_hook = old_rl_startup_hook;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
operate_and_get_next (count, c)
|
||||
int count, c;
|
||||
{
|
||||
/* Accept the current line. */
|
||||
rl_newline (1, c);
|
||||
|
||||
saved_history_logical_offset = rl_explicit_arg ? count : where_history () + history_base + 1;
|
||||
|
||||
old_rl_startup_hook = rl_startup_hook;
|
||||
rl_startup_hook = set_saved_history;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This vi mode command causes VI_EDIT_COMMAND to be run on the current
|
||||
command being entered (if no explicit argument is given), otherwise on
|
||||
a command from the history file. */
|
||||
|
||||
+22
-11
@@ -147,8 +147,8 @@ typedef struct repl {
|
||||
} while (0)
|
||||
|
||||
static char *fc_dosubs PARAMS((char *, REPL *));
|
||||
static char *fc_gethist PARAMS((char *, HIST_ENTRY **));
|
||||
static int fc_gethnum PARAMS((char *, HIST_ENTRY **));
|
||||
static char *fc_gethist PARAMS((char *, HIST_ENTRY **, int));
|
||||
static int fc_gethnum PARAMS((char *, HIST_ENTRY **, int));
|
||||
static int fc_number PARAMS((WORD_LIST *));
|
||||
static void fc_replhist PARAMS((char *));
|
||||
#ifdef INCLUDE_UNUSED
|
||||
@@ -260,7 +260,7 @@ fc_builtin (list)
|
||||
|
||||
/* If we still have something in list, it is a command spec.
|
||||
Otherwise, we use the most recent command in time. */
|
||||
command = fc_gethist (list ? list->word->word : (char *)NULL, hlist);
|
||||
command = fc_gethist (list ? list->word->word : (char *)NULL, hlist, 0);
|
||||
|
||||
if (command == NULL)
|
||||
{
|
||||
@@ -328,11 +328,11 @@ fc_builtin (list)
|
||||
|
||||
if (list)
|
||||
{
|
||||
histbeg = fc_gethnum (list->word->word, hlist);
|
||||
histbeg = fc_gethnum (list->word->word, hlist, listing);
|
||||
list = list->next;
|
||||
|
||||
if (list)
|
||||
histend = fc_gethnum (list->word->word, hlist);
|
||||
histend = fc_gethnum (list->word->word, hlist, listing);
|
||||
else if (histbeg == real_last)
|
||||
histend = listing ? real_last : histbeg;
|
||||
else
|
||||
@@ -353,6 +353,13 @@ fc_builtin (list)
|
||||
histbeg = histend = last_hist;
|
||||
}
|
||||
|
||||
/* We print error messages for line specifications out of range. */
|
||||
if ((histbeg < 0) || (histend < 0))
|
||||
{
|
||||
sh_erange ((char *)NULL, _("history specification"));
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
/* "When not listing, the fc command that caused the editing shall not be
|
||||
entered into the history list." */
|
||||
if (listing == 0 && hist_last_line_added)
|
||||
@@ -499,11 +506,13 @@ fc_number (list)
|
||||
|
||||
/* Return an absolute index into HLIST which corresponds to COMMAND. If
|
||||
COMMAND is a number, then it was specified in relative terms. If it
|
||||
is a string, then it is the start of a command line present in HLIST. */
|
||||
is a string, then it is the start of a command line present in HLIST.
|
||||
MODE is 1 if we are listing commands, 0 if we are executing them. */
|
||||
static int
|
||||
fc_gethnum (command, hlist)
|
||||
fc_gethnum (command, hlist, mode)
|
||||
char *command;
|
||||
HIST_ENTRY **hlist;
|
||||
int mode;
|
||||
{
|
||||
int sign, n, clen, rh;
|
||||
register int i, j, last_hist, real_last;
|
||||
@@ -569,7 +578,7 @@ fc_gethnum (command, hlist)
|
||||
return (n < 0 ? 0 : n);
|
||||
}
|
||||
else if (n == 0)
|
||||
return ((sign == -1) ? real_last : i);
|
||||
return ((sign == -1) ? (mode ? real_last : -1) : i);
|
||||
else
|
||||
{
|
||||
n -= history_base;
|
||||
@@ -587,18 +596,20 @@ fc_gethnum (command, hlist)
|
||||
}
|
||||
|
||||
/* Locate the most recent history line which begins with
|
||||
COMMAND in HLIST, and return a malloc()'ed copy of it. */
|
||||
COMMAND in HLIST, and return a malloc()'ed copy of it.
|
||||
MODE is 1 if we are listing commands, 0 if we are executing them. */
|
||||
static char *
|
||||
fc_gethist (command, hlist)
|
||||
fc_gethist (command, hlist, mode)
|
||||
char *command;
|
||||
HIST_ENTRY **hlist;
|
||||
int mode;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (hlist == 0)
|
||||
return ((char *)NULL);
|
||||
|
||||
i = fc_gethnum (command, hlist);
|
||||
i = fc_gethnum (command, hlist, mode);
|
||||
|
||||
if (i >= 0)
|
||||
return (savestring (histline (i)));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.0, version 5.014.
|
||||
# From configure.ac for Bash 5.0, version 5.015.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for bash 5.0-maint.
|
||||
#
|
||||
@@ -2914,6 +2914,7 @@ sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
|
||||
*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x
|
||||
*-nsk*) opt_bash_malloc=no ;; # HP NonStop
|
||||
*-haiku*) opt_bash_malloc=no ;; # Haiku OS
|
||||
*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk
|
||||
# Deprecated -- bash malloc is suitable
|
||||
#sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
|
||||
#mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
|
||||
|
||||
+3
-2
@@ -5,7 +5,7 @@ dnl report bugs to chet@po.cwru.edu
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 1987-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_REVISION([for Bash 5.0, version 5.014])dnl
|
||||
AC_REVISION([for Bash 5.0, version 5.015])dnl
|
||||
|
||||
define(bashvers, 5.0)
|
||||
define(relstatus, maint)
|
||||
@@ -88,6 +88,7 @@ sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
|
||||
*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x
|
||||
*-nsk*) opt_bash_malloc=no ;; # HP NonStop
|
||||
*-haiku*) opt_bash_malloc=no ;; # Haiku OS
|
||||
*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk
|
||||
# Deprecated -- bash malloc is suitable
|
||||
#sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
|
||||
#mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
|
||||
|
||||
+16
-4
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Apr 30 18:20:53 EDT 2020
|
||||
.\" Last Change: Tue May 5 16:20:48 EDT 2020
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2020 April 30" "GNU Bash 5.0"
|
||||
.TH BASH 1 "2020 May 5" "GNU Bash 5.0"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -1439,7 +1439,7 @@ The following variables are set by the shell:
|
||||
.PD 0
|
||||
.TP
|
||||
.B _
|
||||
At shell startup, set to the absolute pathname used to invoke the
|
||||
At shell startup, set to the pathname used to invoke the
|
||||
shell or shell script being executed as passed in the environment
|
||||
or argument list.
|
||||
Subsequently, expands to the last argument to the previous simple
|
||||
@@ -5495,6 +5495,8 @@ The name of this file is taken from the value of the
|
||||
.B INPUTRC
|
||||
variable. If that variable is unset, the default is
|
||||
.IR ~/.inputrc .
|
||||
If that file does not exist or cannot be read, the ultimate default is
|
||||
.IR /etc/inputrc .
|
||||
When a program which uses the readline library starts up, the
|
||||
initialization file is read, and the key bindings and variables
|
||||
are set.
|
||||
@@ -8450,7 +8452,12 @@ and
|
||||
may be specified as a string (to locate the last command beginning
|
||||
with that string) or as a number (an index into the history list,
|
||||
where a negative number is used as an offset from the current
|
||||
command number). If
|
||||
command number).
|
||||
When listing, a \fIfirst\fP or \fIlast\fP of
|
||||
0 is equivalent to \-1 and \-0 is equivalent to the current
|
||||
command (usually the \fBfc\fP command); otherwise 0 is equivalent to \-1
|
||||
and \-0 is invalid.
|
||||
If
|
||||
.I last
|
||||
is not specified, it is set to
|
||||
the current command for listing (so that
|
||||
@@ -9121,6 +9128,11 @@ If no argument is specified, conversion behaves as if \-1 had been given.
|
||||
This is an exception to the usual \fBprintf\fP behavior.
|
||||
.PD
|
||||
.PP
|
||||
The %b, %q, and %T directives all use the field width and precision
|
||||
arguments from the format specification and write that many bytes from
|
||||
(or use that wide a field for) the expanded argument, which usually
|
||||
contains more characters than the original.
|
||||
.PP
|
||||
Arguments to non-string format specifiers are treated as C constants,
|
||||
except that a leading plus or minus sign is allowed, and if the leading
|
||||
character is a single or double quote, the value is the ASCII value of
|
||||
|
||||
+6
-1
@@ -4540,6 +4540,11 @@ This is an exception to the usual @code{printf} behavior.
|
||||
@end table
|
||||
|
||||
@noindent
|
||||
The %b, %q, and %T directives all use the field width and precision
|
||||
arguments from the format specification and write that many bytes from
|
||||
(or use that wide a field for) the expanded argument, which usually
|
||||
contains more characters than the original.
|
||||
|
||||
Arguments to non-string format specifiers are treated as C language constants,
|
||||
except that a leading plus or minus sign is allowed, and if the leading
|
||||
character is a single or double quote, the value is the ASCII value of
|
||||
@@ -5695,7 +5700,7 @@ variables for controlling the job control facilities
|
||||
@item _
|
||||
@vindex $_
|
||||
($_, an underscore.)
|
||||
At shell startup, set to the absolute pathname used to invoke the
|
||||
At shell startup, set to the pathname used to invoke the
|
||||
shell or shell script being executed as passed in the environment
|
||||
or argument list.
|
||||
Subsequently, expands to the last argument to the previous simple
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Apr 30 18:20:35 EDT 2020
|
||||
@set LASTCHANGE Tue May 5 16:20:28 EDT 2020
|
||||
|
||||
@set EDITION 5.0
|
||||
@set VERSION 5.0
|
||||
|
||||
@set UPDATED 30 April 2020
|
||||
@set UPDATED-MONTH April 2020
|
||||
@set UPDATED 5 May 2020
|
||||
@set UPDATED-MONTH May 2020
|
||||
|
||||
@@ -4289,9 +4289,6 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
|
||||
result = last_command_exit_value;
|
||||
close_pipes (pipe_in, pipe_out);
|
||||
command_line = (char *)NULL; /* don't free this. */
|
||||
#if 0
|
||||
bind_lastarg ((char *)NULL);
|
||||
#endif
|
||||
return (result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,10 @@ hash_string (s)
|
||||
|
||||
for (i = FNV_OFFSET; *s; s++)
|
||||
{
|
||||
i *= FNV_PRIME;
|
||||
/* FNV-1a has the XOR first, traditional FNV-1 has the multiply first */
|
||||
|
||||
/* was i *= FNV_PRIME */
|
||||
i += (i<<1) + (i<<4) + (i<<7) + (i<<8) + (i<<24);
|
||||
i ^= *s;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,14 @@ Both @var{first} and
|
||||
@var{last} may be specified as a string (to locate the most recent
|
||||
command beginning with that string) or as a number (an index into the
|
||||
history list, where a negative number is used as an offset from the
|
||||
current command number). If @var{last} is not specified, it is set to
|
||||
current command number).
|
||||
|
||||
When listing, a @var{first} or @var{last} of 0 is equivalent to -1
|
||||
and -0 is equivalent to the current command (usually the @code{fc}
|
||||
command);
|
||||
otherwise 0 is equivalent to -1 and -0 is invalid.
|
||||
|
||||
If @var{last} is not specified, it is set to
|
||||
@var{first}. If @var{first} is not specified, it is set to the previous
|
||||
command for editing and @minus{}16 for listing. If the @option{-l} flag is
|
||||
given, the commands are listed on standard output. The @option{-n} flag
|
||||
|
||||
@@ -918,6 +918,15 @@ the direction to move through the history. A negative argument switches
|
||||
the direction through the history (back or forward).
|
||||
The history expansion facilities are used to extract the last argument,
|
||||
as if the "!$" history expansion had been specified.
|
||||
.TP
|
||||
.B
|
||||
operate\-and\-get\-next (C\-o)
|
||||
Accept the current line for return to the calling application as if a
|
||||
newline had been entered,
|
||||
and fetch the next line relative to the current line from the history
|
||||
for editing.
|
||||
A numeric argument, if supplied, specifies the history entry to use instead
|
||||
of the current line.
|
||||
.PD
|
||||
.SS Commands for Changing Text
|
||||
.PD 0
|
||||
|
||||
@@ -1322,6 +1322,14 @@ the direction through the history (back or forward).
|
||||
The history expansion facilities are used to extract the last argument,
|
||||
as if the @samp{!$} history expansion had been specified.
|
||||
|
||||
@item operate-and-get-next (C-o)
|
||||
Accept the current line for return to the calling application as if a
|
||||
newline had been entered,
|
||||
and fetch the next line relative to the current line from the history
|
||||
for editing.
|
||||
A numeric argument, if supplied, specifies the history entry to use instead
|
||||
of the current line.
|
||||
|
||||
@end ftable
|
||||
|
||||
@node Commands For Text
|
||||
@@ -1794,12 +1802,6 @@ Perform history and alias expansion on the current line.
|
||||
@item insert-last-argument (M-. or M-_)
|
||||
A synonym for @code{yank-last-arg}.
|
||||
|
||||
@item operate-and-get-next (C-o)
|
||||
Accept the current line for execution and fetch the next line
|
||||
relative to the current line from the history for editing.
|
||||
A numeric argument, if supplied, specifies the history entry to use instead
|
||||
of the current line.
|
||||
|
||||
@item edit-and-execute-command (C-x C-e)
|
||||
Invoke an editor on the current command line, and execute the result as shell
|
||||
commands.
|
||||
|
||||
@@ -4,7 +4,7 @@ Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
|
||||
@set EDITION 8.0
|
||||
@set VERSION 8.0
|
||||
@set UPDATED 24 March 2020
|
||||
@set UPDATED-MONTH March 2020
|
||||
@set UPDATED 4 May 2020
|
||||
@set UPDATED-MONTH May 2020
|
||||
|
||||
@set LASTCHANGE Tue Mar 24 09:28:28 EDT 2020
|
||||
@set LASTCHANGE Mon May 4 14:55:02 EDT 2020
|
||||
|
||||
@@ -47,7 +47,7 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = {
|
||||
{ ISFUNC, rl_clear_screen }, /* Control-l */
|
||||
{ ISFUNC, rl_newline }, /* Control-m */
|
||||
{ ISFUNC, rl_get_next_history }, /* Control-n */
|
||||
{ ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
|
||||
{ ISFUNC, rl_operate_and_get_next }, /* Control-o */
|
||||
{ ISFUNC, rl_get_previous_history }, /* Control-p */
|
||||
{ ISFUNC, rl_quoted_insert }, /* Control-q */
|
||||
{ ISFUNC, rl_reverse_search_history }, /* Control-r */
|
||||
|
||||
@@ -117,6 +117,7 @@ static const FUNMAP default_funmap[] = {
|
||||
{ "non-incremental-forward-search-history-again", rl_noninc_forward_search_again },
|
||||
{ "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again },
|
||||
{ "old-menu-complete", rl_old_menu_complete },
|
||||
{ "operate-and-get-next", rl_operate_and_get_next },
|
||||
{ "overwrite-mode", rl_overwrite_mode },
|
||||
#if defined (_WIN32)
|
||||
{ "paste-from-clipboard", rl_paste_from_clipboard },
|
||||
|
||||
@@ -637,6 +637,48 @@ rl_get_previous_history (int count, int key)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The equivalent of the Korn shell C-o operate-and-get-next-history-line
|
||||
editing command. */
|
||||
|
||||
/* This could stand to be global to the readline library */
|
||||
static rl_hook_func_t *_rl_saved_internal_startup_hook = 0;
|
||||
static int saved_history_logical_offset = -1;
|
||||
|
||||
#define HISTORY_FULL() (history_is_stifled () && history_length >= history_max_entries)
|
||||
|
||||
static int
|
||||
set_saved_history ()
|
||||
{
|
||||
int absolute_offset, count;
|
||||
|
||||
if (saved_history_logical_offset >= 0)
|
||||
{
|
||||
absolute_offset = saved_history_logical_offset - history_base;
|
||||
count = where_history () - absolute_offset;
|
||||
rl_get_previous_history (count, 0);
|
||||
}
|
||||
saved_history_logical_offset = -1;
|
||||
_rl_internal_startup_hook = _rl_saved_internal_startup_hook;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
rl_operate_and_get_next (count, c)
|
||||
int count, c;
|
||||
{
|
||||
/* Accept the current line. */
|
||||
rl_newline (1, c);
|
||||
|
||||
saved_history_logical_offset = rl_explicit_arg ? count : where_history () + history_base + 1;
|
||||
|
||||
|
||||
_rl_saved_internal_startup_hook = _rl_internal_startup_hook;
|
||||
_rl_internal_startup_hook = set_saved_history;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
/* Editing Modes */
|
||||
|
||||
@@ -199,6 +199,10 @@ int rl_key_sequence_length = 0;
|
||||
before readline_internal_setup () prints the first prompt. */
|
||||
rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL;
|
||||
|
||||
/* Any readline function can set this and have it run just before the user's
|
||||
rl_startup_hook. */
|
||||
rl_hook_func_t *_rl_internal_startup_hook = (rl_hook_func_t *)NULL;
|
||||
|
||||
/* If non-zero, this is the address of a function to call just before
|
||||
readline_internal_setup () returns and readline_internal starts
|
||||
reading input characters. */
|
||||
@@ -420,6 +424,9 @@ readline_internal_setup (void)
|
||||
if (rl_startup_hook)
|
||||
(*rl_startup_hook) ();
|
||||
|
||||
if (_rl_internal_startup_hook)
|
||||
(*_rl_internal_startup_hook) ();
|
||||
|
||||
rl_deactivate_mark ();
|
||||
|
||||
#if defined (VI_MODE)
|
||||
|
||||
@@ -133,6 +133,7 @@ extern int rl_beginning_of_history PARAMS((int, int));
|
||||
extern int rl_end_of_history PARAMS((int, int));
|
||||
extern int rl_get_next_history PARAMS((int, int));
|
||||
extern int rl_get_previous_history PARAMS((int, int));
|
||||
extern int rl_operate_and_get_next PARAMS((int, int));
|
||||
|
||||
/* Bindable commands for managing the mark and region. */
|
||||
extern int rl_set_mark PARAMS((int, int));
|
||||
|
||||
@@ -545,6 +545,8 @@ extern int _rl_keyseq_timeout;
|
||||
|
||||
extern int _rl_executing_keyseq_size;
|
||||
|
||||
extern rl_hook_func_t *_rl_internal_startup_hook;
|
||||
|
||||
/* search.c */
|
||||
extern _rl_search_cxt *_rl_nscxt;
|
||||
|
||||
|
||||
@@ -1434,7 +1434,7 @@ run_one_command (command)
|
||||
command_error ("run_one_command", CMDERR_BADJUMP, code, 0);
|
||||
}
|
||||
}
|
||||
return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST));
|
||||
return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST|SEVAL_RESETLINE));
|
||||
}
|
||||
#endif /* ONESHOT */
|
||||
|
||||
|
||||
Vendored
+242
-54
@@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2018-08-29'
|
||||
timestamp='2020-04-26'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -50,7 +50,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -96,10 +96,11 @@ fi
|
||||
|
||||
tmp=
|
||||
# shellcheck disable=SC2172
|
||||
trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
|
||||
trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
|
||||
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
|
||||
|
||||
set_cc_for_build() {
|
||||
# prevent multiple calls if $tmp is already set
|
||||
test "$tmp" && return 0
|
||||
: "${TMPDIR=/tmp}"
|
||||
# shellcheck disable=SC2039
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
@@ -263,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
*:SolidBSD:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:OS108:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
@@ -272,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
*:Sortix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-sortix
|
||||
exit ;;
|
||||
*:Twizzler:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-twizzler
|
||||
exit ;;
|
||||
*:Redox:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-redox
|
||||
exit ;;
|
||||
mips:OSF1:*.*)
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
@@ -392,15 +399,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
echo i386-pc-auroraux"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
|
||||
case `isainfo -b` in
|
||||
32)
|
||||
echo i386-pc-solaris2"$UNAME_REL"
|
||||
;;
|
||||
64)
|
||||
echo x86_64-pc-solaris2"$UNAME_REL"
|
||||
;;
|
||||
esac
|
||||
set_cc_for_build
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH=x86_64
|
||||
fi
|
||||
fi
|
||||
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
@@ -914,7 +926,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
EV56) UNAME_MACHINE=alphaev56 ;;
|
||||
PCA56) UNAME_MACHINE=alphapca56 ;;
|
||||
@@ -981,22 +993,50 @@ EOF
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
IS_GLIBC=0
|
||||
test x"${LIBC}" = xgnu && IS_GLIBC=1
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#undef CPU
|
||||
#undef ${UNAME_MACHINE}
|
||||
#undef ${UNAME_MACHINE}el
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if ${IS_GLIBC} && defined(_ABI64)
|
||||
LIBCABI=gnuabi64
|
||||
#else
|
||||
#if ${IS_GLIBC} && defined(_ABIN32)
|
||||
LIBCABI=gnuabin32
|
||||
#else
|
||||
LIBCABI=${LIBC}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
||||
CPU=mipsisa64r6
|
||||
#else
|
||||
#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
||||
CPU=mipsisa32r6
|
||||
#else
|
||||
#if defined(__mips64)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=mips
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=${UNAME_MACHINE}el
|
||||
MIPS_ENDIAN=el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=${UNAME_MACHINE}
|
||||
MIPS_ENDIAN=
|
||||
#else
|
||||
CPU=
|
||||
MIPS_ENDIAN=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
|
||||
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
|
||||
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
|
||||
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
|
||||
;;
|
||||
mips64el:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
@@ -1109,7 +1149,7 @@ EOF
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
|
||||
esac
|
||||
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
|
||||
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
|
||||
exit ;;
|
||||
i*86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
@@ -1293,38 +1333,39 @@ EOF
|
||||
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
if command -v xcode-select > /dev/null 2> /dev/null && \
|
||||
! xcode-select --print-path > /dev/null 2> /dev/null ; then
|
||||
# Avoid executing cc if there is no toolchain installed as
|
||||
# cc will be a stub that puts up a graphical alert
|
||||
# prompting the user to install developer tools.
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
else
|
||||
set_cc_for_build
|
||||
fi
|
||||
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
# uname -m returns i386 or x86_64
|
||||
UNAME_PROCESSOR=$UNAME_MACHINE
|
||||
fi
|
||||
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
@@ -1424,8 +1465,148 @@ EOF
|
||||
amd64:Isilon\ OneFS:*:*)
|
||||
echo x86_64-unknown-onefs
|
||||
exit ;;
|
||||
*:Unleashed:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
# No uname command or uname output not recognized.
|
||||
set_cc_for_build
|
||||
cat > "$dummy.c" <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
||||
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
||||
#include <signal.h>
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
#include <sys/param.h>
|
||||
#if defined (BSD)
|
||||
#if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
#else
|
||||
#if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#endif
|
||||
#else
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
struct utsname un;
|
||||
uname (&un);
|
||||
printf ("vax-dec-ultrix%s\n", un.release); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
||||
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
struct utsname *un;
|
||||
uname (&un);
|
||||
printf ("mips-dec-ultrix%s\n", un.release); exit (0);
|
||||
#else
|
||||
printf ("mips-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
||||
{ echo "$SYSTEM_NAME"; exit; }
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
|
||||
|
||||
echo "$0: unable to guess system type" >&2
|
||||
|
||||
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
|
||||
@@ -1448,6 +1629,12 @@ copies of config.guess and config.sub with the latest versions from:
|
||||
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
|
||||
and
|
||||
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
|
||||
EOF
|
||||
|
||||
year=`echo $timestamp | sed 's,-.*,,'`
|
||||
# shellcheck disable=SC2003
|
||||
if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then
|
||||
cat >&2 <<EOF
|
||||
|
||||
If $0 has already been updated, send the following data and any
|
||||
information you think might be pertinent to config-patches@gnu.org to
|
||||
@@ -1475,6 +1662,7 @@ UNAME_RELEASE = "$UNAME_RELEASE"
|
||||
UNAME_SYSTEM = "$UNAME_SYSTEM"
|
||||
UNAME_VERSION = "$UNAME_VERSION"
|
||||
EOF
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
|
||||
Executable
+1486
File diff suppressed because it is too large
Load Diff
Vendored
+32
-29
@@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2018-08-29'
|
||||
timestamp='2020-05-04'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -111,7 +111,8 @@ case $# in
|
||||
esac
|
||||
|
||||
# Split fields of configuration type
|
||||
IFS="-" read -r field1 field2 field3 field4 <<EOF
|
||||
# shellcheck disable=SC2162
|
||||
IFS="-" read field1 field2 field3 field4 <<EOF
|
||||
$1
|
||||
EOF
|
||||
|
||||
@@ -336,17 +337,14 @@ case $1 in
|
||||
basic_machine=m88k-harris
|
||||
os=sysv3
|
||||
;;
|
||||
hp300)
|
||||
hp300 | hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=hpux
|
||||
;;
|
||||
hp300bsd)
|
||||
basic_machine=m68k-hp
|
||||
os=bsd
|
||||
;;
|
||||
hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=hpux
|
||||
;;
|
||||
hppaosf)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=osf
|
||||
@@ -359,10 +357,6 @@ case $1 in
|
||||
basic_machine=i386-mach
|
||||
os=mach
|
||||
;;
|
||||
vsta)
|
||||
basic_machine=i386-pc
|
||||
os=vsta
|
||||
;;
|
||||
isi68 | isi)
|
||||
basic_machine=m68k-isi
|
||||
os=sysv
|
||||
@@ -611,6 +605,10 @@ case $1 in
|
||||
basic_machine=vax-dec
|
||||
os=vms
|
||||
;;
|
||||
vsta)
|
||||
basic_machine=i386-pc
|
||||
os=vsta
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=vxworks
|
||||
@@ -821,7 +819,9 @@ case $basic_machine in
|
||||
cpu=m68k
|
||||
vendor=next
|
||||
case $os in
|
||||
nextstep* )
|
||||
openstep*)
|
||||
;;
|
||||
nextstep*)
|
||||
;;
|
||||
ns2*)
|
||||
os=nextstep2
|
||||
@@ -918,7 +918,8 @@ case $basic_machine in
|
||||
;;
|
||||
|
||||
*-*)
|
||||
IFS="-" read -r cpu vendor <<EOF
|
||||
# shellcheck disable=SC2162
|
||||
IFS="-" read cpu vendor <<EOF
|
||||
$basic_machine
|
||||
EOF
|
||||
;;
|
||||
@@ -1161,13 +1162,14 @@ case $cpu-$vendor in
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
|
||||
| alphapca5[67] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| amdgcn \
|
||||
| arc | arceb \
|
||||
| arm | arm[lb]e | arme[lb] | armv* \
|
||||
| avr | avr32 \
|
||||
| asmjs \
|
||||
| ba \
|
||||
| be32 | be64 \
|
||||
| bfin | bs2000 \
|
||||
| bfin | bpf | bs2000 \
|
||||
| c[123]* | c30 | [cjt]90 | c4x \
|
||||
| c8051 | clipper | craynv | csky | cydra \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
@@ -1182,13 +1184,13 @@ case $cpu-$vendor in
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle \
|
||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
|
||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
|
||||
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
|
||||
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
|
||||
| m88110 | m88k | maxq | mb | mcore | mep | metag \
|
||||
| microblaze | microblazeel \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64 | mips64eb | mips64el \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
@@ -1215,11 +1217,12 @@ case $cpu-$vendor in
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nfp \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| none | np1 | ns16k | ns32k \
|
||||
| none | np1 | ns16k | ns32k | nvptx \
|
||||
| open8 \
|
||||
| or1k* \
|
||||
| or32 \
|
||||
| orion \
|
||||
| picochip \
|
||||
| pdp10 | pdp11 | pj | pjl | pn | power \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
|
||||
| pru \
|
||||
@@ -1227,7 +1230,8 @@ case $cpu-$vendor in
|
||||
| riscv | riscv32 | riscv64 \
|
||||
| rl78 | romp | rs6000 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
|
||||
| sh | shl \
|
||||
| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
|
||||
| sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
|
||||
| sparclite \
|
||||
@@ -1237,10 +1241,11 @@ case $cpu-$vendor in
|
||||
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
|
||||
| tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
|
||||
| vax \
|
||||
| visium \
|
||||
| wasm32 \
|
||||
| w65 \
|
||||
| wasm32 | wasm64 \
|
||||
| we32k \
|
||||
| x86 | x86_64 | xc16x | xgate | xps100 \
|
||||
| xstormy16 | xtensa* \
|
||||
@@ -1338,11 +1343,11 @@ case $os in
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | kopensolaris* | plan9* \
|
||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||
| aos* | aros* | cloudabi* | sortix* \
|
||||
| aos* | aros* | cloudabi* | sortix* | twizzler* \
|
||||
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
||||
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
|
||||
| knetbsd* | mirbsd* | netbsd* \
|
||||
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
||||
| bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
|
||||
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||
@@ -1360,7 +1365,8 @@ case $os in
|
||||
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
|
||||
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd*)
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
qnx*)
|
||||
@@ -1444,9 +1450,6 @@ case $os in
|
||||
ns2)
|
||||
os=nextstep2
|
||||
;;
|
||||
nsk*)
|
||||
os=nsk
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
|
||||
Executable
+1790
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,4 +1,4 @@
|
||||
BUILD_DIR=/usr/local/build/chet/bash/bash-current
|
||||
BUILD_DIR=/usr/local/build/bash/bash-current
|
||||
THIS_SH=$BUILD_DIR/bash
|
||||
PATH=$PATH:$BUILD_DIR
|
||||
|
||||
|
||||
@@ -227,3 +227,17 @@ mid
|
||||
right)
|
||||
A
|
||||
B
|
||||
a
|
||||
b
|
||||
./history5.sub: line 24: fc: history specification out of range
|
||||
./history5.sub: line 25: fc: no command found
|
||||
1 echo a
|
||||
2 echo b
|
||||
3 fc -0 # error
|
||||
4 fc -s -0 # error
|
||||
c
|
||||
6 echo c
|
||||
8 fc -l -0
|
||||
d
|
||||
echo d
|
||||
d
|
||||
|
||||
@@ -128,3 +128,4 @@ rm -f $TMPDIR/foohist-*
|
||||
${THIS_SH} ./history2.sub
|
||||
${THIS_SH} ./history3.sub
|
||||
${THIS_SH} ./history4.sub
|
||||
${THIS_SH} ./history5.sub
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
trap 'rm -f $HISTFILE' 0 1 2 3 6 15
|
||||
|
||||
HISTFILE=$TMPDIR/foohist-$$
|
||||
unset HISTIGNORE HISTCONTROL
|
||||
set -o history
|
||||
|
||||
echo a
|
||||
echo b
|
||||
|
||||
fc -0 # error
|
||||
fc -s -0 # error
|
||||
|
||||
fc -l
|
||||
|
||||
echo c
|
||||
fc -l 0
|
||||
fc -l -0
|
||||
|
||||
echo d
|
||||
fc -s 0
|
||||
Reference in New Issue
Block a user