mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 08:29:54 +02:00
Bash-5.3-rc2 release
This commit is contained in:
@@ -1,3 +1,45 @@
|
||||
This document details the changes between this version, bash-5.3-rc2, and
|
||||
the previous version, bash-5.3-rc1.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a problem with invoking the correct programmable completion compspec
|
||||
if the line contains a quoted command separator before point.
|
||||
|
||||
b. Fixed a bug in the `read' builtin that caused it to skip the delimiter if
|
||||
it appeared in an invalid multibyte character.
|
||||
|
||||
c. Fixed a bug with parsing command substitutions that caused a syntax error
|
||||
to pop too many input sources.
|
||||
|
||||
d. Fixed an issue with recursive parsing that caused the parser to reset and
|
||||
pop all the delimiters off the stack; the caller needs to check for that
|
||||
possibility.
|
||||
|
||||
e. Fixed an issue with interactive input that caused EOF not to exit the
|
||||
shell if it was read as part of a here-document.
|
||||
|
||||
f. Fixed an issue with a backslash-newline appearing after a right paren in
|
||||
a nested subshell command.
|
||||
|
||||
g. Fixed an issue with invalid sequence expressions in brace expansions.
|
||||
|
||||
h. Fixed an issue with a nameref variable referencing an unset array element
|
||||
when the nounset option is enabled.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. The history library no longer skips blank lines while it is reading a
|
||||
multiline history entry from a history file.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. The `install-strip' and `strip' Makefile targets now deal with cross-
|
||||
compiling.
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-5.3-rc1, and
|
||||
the previous version, bash-5.3-beta.
|
||||
|
||||
|
||||
+166
-1
@@ -1,4 +1,3 @@
|
||||
|
||||
12/6/2020
|
||||
---------
|
||||
|
||||
@@ -11103,3 +11102,169 @@ lib/sh/gettimeofday.c
|
||||
- updated from version in gnulib
|
||||
|
||||
[bash-5.3-rc1 frozen]
|
||||
|
||||
4/4
|
||||
---
|
||||
examples/loadables/fltexpr.c
|
||||
- add support for function calls; support almost all math function
|
||||
calls in math.h
|
||||
- add support for pi, gamma, e mathematical constants
|
||||
|
||||
4/7
|
||||
---
|
||||
doc/bash.1,doc/bashref.texi
|
||||
- HISTFILESIZE: note that the history file will contain complete
|
||||
history entries whose lines may total slightly more than
|
||||
$HISTFILESIZE if the entries contain multiple lines
|
||||
From a report from Jens Schmidt <farblos@vodafonemail.de>
|
||||
- export: note that you can use -f with -p to display exported functions
|
||||
From a report from Duncan Roe <duncan_roe@optusnet.com.au>
|
||||
|
||||
builtins/history.def
|
||||
- add history -d start-end to the long doc
|
||||
From a report from Duncan Roe <duncan_roe@optusnet.com.au>
|
||||
|
||||
4/9
|
||||
---
|
||||
lib/readline/histfile.c
|
||||
- read_history_range: changes to not skip blank lines if we are
|
||||
reading a history file with multiline history entries.
|
||||
From a report by Jens Schmidt <farblos@vodafonemail.de>
|
||||
|
||||
4/11
|
||||
----
|
||||
bashline.c
|
||||
- attempt_shell_completion: move the check for char_is_quoted from
|
||||
check_redir to the caller, set in_command_position to 0 if the
|
||||
command separator is quoted
|
||||
From https://savannah.gnu.org/support/?111224 david@mandelberg.org
|
||||
- check_extglob: break check for extended glob out into separate
|
||||
function, call from attempted_shell_completion, set in_command_position
|
||||
to -1 if it returns 1, as with the old call to check_redir
|
||||
|
||||
4/21
|
||||
----
|
||||
builtins/read.def
|
||||
- read_mbchar: if we read a delimiter character that makes an
|
||||
incomplete multibyte character into an invalid multibyte character,
|
||||
only push the delimiter back if we read that character ourselves
|
||||
(i > 1).
|
||||
Report from Greg Wooledge <greg@wooledge.org>
|
||||
|
||||
4/23
|
||||
----
|
||||
parse.y
|
||||
- pop_delimiter: only decrement delimiter_depth if it's > 0, since
|
||||
reset_parser() may have set it to 0 after the matching call to
|
||||
push_delimiter
|
||||
Report from Grisha Levit <grishalevit@gmail.com> based on a report
|
||||
from Александр Ушаков <aushakov@astralinux.ru>
|
||||
|
||||
4/25
|
||||
----
|
||||
parse.y
|
||||
- read_a_line: if the shell is interactive, and not reading from a
|
||||
string, check whether a previous call to shell_getc has set
|
||||
EOF_Reached and return EOF in this case, after resetting the
|
||||
current token to '\n'. This makes EOFs that are not the first
|
||||
character on the line `sticky' instead of just token delimiters.
|
||||
From https://savannah.gnu.org/bugs/?67045
|
||||
- history_delimiting_chars: if it looks like we just finished a
|
||||
subshell, and the line we're adding begins with an operator that
|
||||
can't follow a semicolon, return a newline
|
||||
From https://savannah.gnu.org/patch/?10517
|
||||
|
||||
4/28
|
||||
----
|
||||
parse.y
|
||||
- parse_arith_command: if the character after the first right paren
|
||||
isn't a right paren, making the construct a nested subshell, push
|
||||
that character back and return the subshell command as the current
|
||||
token string, which we push onto the pushed string list. Reading
|
||||
one character more can cause synchronization problems with backslash
|
||||
newline, among other things.
|
||||
From https://savannah.gnu.org/patch/?10517
|
||||
|
||||
4/29
|
||||
----
|
||||
builtins/evalstring.c
|
||||
- parse_string: only run the top-level unwind-protects if we're
|
||||
actually going to be calling jump_to_top_level(); otherwise let
|
||||
xparse_dolparen take care of it
|
||||
From a report by Александр Ушаков <aushakov@astralinux.ru>
|
||||
|
||||
5/1
|
||||
---
|
||||
lib/sh/zread.c
|
||||
- zungetc: rework to use a local 16-byte buffer so we can push back
|
||||
multiple characters whether we use read or zread
|
||||
- zread/zreadretry/zreadintr/zreadc/zreadcintr/zreadn: changed to use
|
||||
zpopbuf to check whether we have pushed back bytes
|
||||
- zreset,zsyncfd: reset the pushback buffer indices
|
||||
|
||||
builtins/read.def
|
||||
- read_mbchar: handle the delimiter being part of an invalid multibyte
|
||||
character, not just the byte that makes the multibyte character
|
||||
invalid: keep track of where the delimiter char is in the buffer and
|
||||
use zungetc to push back that character and everything we read
|
||||
after it so subsequent buffered (zread) or unbuffered (read) reads
|
||||
will return them
|
||||
|
||||
5/2
|
||||
---
|
||||
lib/readline/display.c,lib/readline/histexpand.c,lib/readline/history.c,
|
||||
lib/readline/input.c,lib/readline/search.c,lib/readline/shell.c,
|
||||
lib/readline/util.c,lib/readline/readline.c,lib/readline/histfile.c
|
||||
- fixes for issues (unused variables, etc.) uncovered by static
|
||||
analysis
|
||||
All from a report by Siteshwar Vashisht <svashisht@redhat.com>
|
||||
|
||||
5/16
|
||||
----
|
||||
lib/readline/terminal.c
|
||||
- NEED_EXTERN_PC: add __gnu_hurd__ to the systems that require this
|
||||
if not using ncurses; rework the structure of the defines
|
||||
Report from Collin Funk <collin.funk1@gmail.com>
|
||||
|
||||
braces.c
|
||||
- brace_gobbler: don't mark an expression as BRACE_SEQ if we've
|
||||
already seen a comma and marked it as BRACE_COMMA, so we treat
|
||||
it as a comma brace expansion.
|
||||
From a report by Sam James <sam@gentoo.org>
|
||||
|
||||
support/install-sh
|
||||
- new version from coreutils-git (2024-12-03.03); renamed from install.sh
|
||||
|
||||
aclocal.m4
|
||||
- AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP: added from automake
|
||||
|
||||
configure.ac
|
||||
- call AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP
|
||||
|
||||
Makefile.in
|
||||
- STRIP: let configure substitute it from AC_CHECK_TOOL result
|
||||
- INSTALL_STRIP_PROGRAM: let configure substitute it from
|
||||
AM_PROG_INSTALL_STRIP
|
||||
- install-strip: change to set INSTALL_PROGRAM=${INSTALL_STRIP_PROGRAM}
|
||||
to avoid hard-coding `-s' in the recipe
|
||||
All from a report by NR <nroycea+gnu@gmail.com>
|
||||
|
||||
5/18
|
||||
----
|
||||
subst.c
|
||||
- param_expand: if we expand a nameref that references an unset array
|
||||
variable reference, make sure we enforce `nounset', with the usual
|
||||
exceptions for `@' and `*' subscripts
|
||||
From a report from Emanuele Torre <torreemanuele6@gmail.com>
|
||||
|
||||
5/22
|
||||
----
|
||||
buildconf.h.in
|
||||
- add additional defines for conservative ISO C/POSIX environment
|
||||
- add HAVE_C_BOOL define in case someone cross-compiles with a C23
|
||||
compiler
|
||||
From a report by Bruce Dubbs <bdubbs@linuxfromscratch.org>
|
||||
|
||||
builtins/mkbuiltins.c
|
||||
- include buildconf.h instead of having separate defines when
|
||||
cross-compiling
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
12/6/2020
|
||||
---------
|
||||
|
||||
@@ -11103,3 +11102,169 @@ lib/sh/gettimeofday.c
|
||||
- updated from version in gnulib
|
||||
|
||||
[bash-5.3-rc1 frozen]
|
||||
|
||||
4/4
|
||||
---
|
||||
examples/loadables/fltexpr.c
|
||||
- add support for function calls; support almost all math function
|
||||
calls in math.h
|
||||
- add support for pi, gamma, e mathematical constants
|
||||
|
||||
4/7
|
||||
---
|
||||
doc/bash.1,doc/bashref.texi
|
||||
- HISTFILESIZE: note that the history file will contain complete
|
||||
history entries whose lines may total slightly more than
|
||||
$HISTFILESIZE if the entries contain multiple lines
|
||||
From a report from Jens Schmidt <farblos@vodafonemail.de>
|
||||
- export: note that you can use -f with -p to display exported functions
|
||||
From a report from Duncan Roe <duncan_roe@optusnet.com.au>
|
||||
|
||||
builtins/history.def
|
||||
- add history -d start-end to the long doc
|
||||
From a report from Duncan Roe <duncan_roe@optusnet.com.au>
|
||||
|
||||
4/9
|
||||
---
|
||||
lib/readline/histfile.c
|
||||
- read_history_range: changes to not skip blank lines if we are
|
||||
reading a history file with multiline history entries.
|
||||
From a report by Jens Schmidt <farblos@vodafonemail.de>
|
||||
|
||||
4/11
|
||||
----
|
||||
bashline.c
|
||||
- attempt_shell_completion: move the check for char_is_quoted from
|
||||
check_redir to the caller, set in_command_position to 0 if the
|
||||
command separator is quoted
|
||||
From https://savannah.gnu.org/support/?111224 david@mandelberg.org
|
||||
- check_extglob: break check for extended glob out into separate
|
||||
function, call from attempted_shell_completion, set in_command_position
|
||||
to -1 if it returns 1, as with the old call to check_redir
|
||||
|
||||
4/21
|
||||
----
|
||||
builtins/read.def
|
||||
- read_mbchar: if we read a delimiter character that makes an
|
||||
incomplete multibyte character into an invalid multibyte character,
|
||||
only push the delimiter back if we read that character ourselves
|
||||
(i > 1).
|
||||
Report from Greg Wooledge <greg@wooledge.org>
|
||||
|
||||
4/23
|
||||
----
|
||||
parse.y
|
||||
- pop_delimiter: only decrement delimiter_depth if it's > 0, since
|
||||
reset_parser() may have set it to 0 after the matching call to
|
||||
push_delimiter
|
||||
Report from Grisha Levit <grishalevit@gmail.com> based on a report
|
||||
from Александр Ушаков <aushakov@astralinux.ru>
|
||||
|
||||
4/25
|
||||
----
|
||||
parse.y
|
||||
- read_a_line: if the shell is interactive, and not reading from a
|
||||
string, check whether a previous call to shell_getc has set
|
||||
EOF_Reached and return EOF in this case, after resetting the
|
||||
current token to '\n'. This makes EOFs that are not the first
|
||||
character on the line `sticky' instead of just token delimiters.
|
||||
From https://savannah.gnu.org/bugs/?67045
|
||||
- history_delimiting_chars: if it looks like we just finished a
|
||||
subshell, and the line we're adding begins with an operator that
|
||||
can't follow a semicolon, return a newline
|
||||
From https://savannah.gnu.org/patch/?10517
|
||||
|
||||
4/28
|
||||
----
|
||||
parse.y
|
||||
- parse_arith_command: if the character after the first right paren
|
||||
isn't a right paren, making the construct a nested subshell, push
|
||||
that character back and return the subshell command as the current
|
||||
token string, which we push onto the pushed string list. Reading
|
||||
one character more can cause synchronization problems with backslash
|
||||
newline, among other things.
|
||||
From https://savannah.gnu.org/patch/?10517
|
||||
|
||||
4/29
|
||||
----
|
||||
builtins/evalstring.c
|
||||
- parse_string: only run the top-level unwind-protects if we're
|
||||
actually going to be calling jump_to_top_level(); otherwise let
|
||||
xparse_dolparen take care of it
|
||||
From a report by Александр Ушаков <aushakov@astralinux.ru>
|
||||
|
||||
5/1
|
||||
---
|
||||
lib/sh/zread.c
|
||||
- zungetc: rework to use a local 16-byte buffer so we can push back
|
||||
multiple characters whether we use read or zread
|
||||
- zread/zreadretry/zreadintr/zreadc/zreadcintr/zreadn: changed to use
|
||||
zpopbuf to check whether we have pushed back bytes
|
||||
- zreset,zsyncfd: reset the pushback buffer indices
|
||||
|
||||
builtins/read.def
|
||||
- read_mbchar: handle the delimiter being part of an invalid multibyte
|
||||
character, not just the byte that makes the multibyte character
|
||||
invalid: keep track of where the delimiter char is in the buffer and
|
||||
use zungetc to push back that character and everything we read
|
||||
after it so subsequent buffered (zread) or unbuffered (read) reads
|
||||
will return them
|
||||
|
||||
5/2
|
||||
---
|
||||
lib/readline/display.c,lib/readline/histexpand.c,lib/readline/history.c,
|
||||
lib/readline/input.c,lib/readline/search.c,lib/readline/shell.c,
|
||||
lib/readline/util.c,lib/readline/readline.c,lib/readline/histfile.c
|
||||
- fixes for issues (unused variables, etc.) uncovered by static
|
||||
analysis
|
||||
All from a report by Siteshwar Vashisht <svashisht@redhat.com>
|
||||
|
||||
5/16
|
||||
----
|
||||
lib/readline/terminal.c
|
||||
- NEED_EXTERN_PC: add __gnu_hurd__ to the systems that require this
|
||||
if not using ncurses; rework the structure of the defines
|
||||
Report from Collin Funk <collin.funk1@gmail.com>
|
||||
|
||||
braces.c
|
||||
- brace_gobbler: don't mark an expression as BRACE_SEQ if we've
|
||||
already seen a comma and marked it as BRACE_COMMA, so we treat
|
||||
it as a comma brace expansion.
|
||||
From a report by Sam James <sam@gentoo.org>
|
||||
|
||||
support/install-sh
|
||||
- new version from coreutils-git (2024-12-03.03); renamed from install.sh
|
||||
|
||||
aclocal.m4
|
||||
- AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP: added from automake
|
||||
|
||||
configure.ac
|
||||
- call AM_PROG_INSTALL_SH, AM_PROG_INSTALL_STRIP
|
||||
|
||||
Makefile.in
|
||||
- STRIP: let configure substitute it from AC_CHECK_TOOL result
|
||||
- INSTALL_STRIP_PROGRAM: let configure substitute it from
|
||||
AM_PROG_INSTALL_STRIP
|
||||
- install-strip: change to set INSTALL_PROGRAM=${INSTALL_STRIP_PROGRAM}
|
||||
to avoid hard-coding `-s' in the recipe
|
||||
All from a report by NR <nroycea+gnu@gmail.com>
|
||||
|
||||
5/18
|
||||
----
|
||||
subst.c
|
||||
- param_expand: if we expand a nameref that references an unset array
|
||||
variable reference, make sure we enforce `nounset', with the usual
|
||||
exceptions for `@' and `*' subscripts
|
||||
From a report from Emanuele Torre <torreemanuele6@gmail.com>
|
||||
|
||||
5/22
|
||||
----
|
||||
buildconf.h.in
|
||||
- add additional defines for conservative ISO C/POSIX environment
|
||||
- add HAVE_C_BOOL define in case someone cross-compiles with a C23
|
||||
compiler
|
||||
From a report by Bruce Dubbs <bdubbs@linuxfromscratch.org>
|
||||
|
||||
builtins/mkbuiltins.c
|
||||
- include buildconf.h instead of having separate defines when
|
||||
cross-compiling
|
||||
|
||||
@@ -741,7 +741,7 @@ support/zecho.c f
|
||||
support/xcase.c f
|
||||
support/SYMLINKS f
|
||||
support/fixlinks f 755
|
||||
support/install.sh f 755
|
||||
support/install-sh f 755
|
||||
support/texi2dvi f 755
|
||||
support/texi2html f 755
|
||||
#support/xenix-link.sh f 755
|
||||
@@ -1294,6 +1294,7 @@ tests/history5.sub f
|
||||
tests/history6.sub f
|
||||
tests/history7.sub f
|
||||
tests/history8.sub f
|
||||
tests/history9.sub f
|
||||
tests/ifs.tests f
|
||||
tests/ifs.right f
|
||||
tests/ifs1.sub f
|
||||
@@ -1366,6 +1367,7 @@ tests/nameref21.sub f
|
||||
tests/nameref22.sub f
|
||||
tests/nameref23.sub f
|
||||
tests/nameref24.sub f
|
||||
tests/nameref25.sub f
|
||||
tests/nameref.right f
|
||||
tests/new-exp.tests f
|
||||
tests/new-exp1.sub f
|
||||
|
||||
+6
-3
@@ -1,4 +1,4 @@
|
||||
# Makefile for bash-5.3, version 5.8
|
||||
# Makefile for bash-5.3, version 5.10
|
||||
#
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
|
||||
@@ -79,15 +79,18 @@ AR = @AR@
|
||||
ARFLAGS = @ARFLAGS@
|
||||
RANLIB = @RANLIB@
|
||||
SIZE = @SIZE@
|
||||
STRIP = strip
|
||||
STRIP = @STRIP@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALLMODE= -m 0755
|
||||
INSTALLMODE2 = -m 0555
|
||||
|
||||
install_sh = @install_sh@
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS = -x
|
||||
ETAGS = etags
|
||||
@@ -923,7 +926,7 @@ install: .made installdirs
|
||||
-( cd $(LOADABLES_DIR) && $(MAKE) $(BASH_MAKEFLAGS) DESTDIR=$(DESTDIR) $@ )
|
||||
|
||||
install-strip:
|
||||
$(MAKE) $(BASH_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
|
||||
$(MAKE) $(BASH_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' \
|
||||
prefix=${prefix} exec_prefix=${exec_prefix} \
|
||||
DESTDIR=$(DESTDIR) install
|
||||
|
||||
|
||||
@@ -146,6 +146,9 @@ uu. If `exit' is run in a trap and not supplied an exit status argument, it
|
||||
vv. There is a new `fltexpr' builtin to perform floating-point arithmetic
|
||||
similarly to `let'.
|
||||
|
||||
ww. The `install-strip' and `strip' Makefile targets now deal with cross-
|
||||
compiling.
|
||||
|
||||
2. New Features in Readline
|
||||
|
||||
a. Output a newline if there is no prompt and readline reads an empty line.
|
||||
|
||||
Vendored
+65
@@ -2240,3 +2240,68 @@ else
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([FNMATCH_EQUIV_FALLBACK], [$bash_cv_fnmatch_equiv_value], [Whether fnmatch can be used for bracket equivalence classes])
|
||||
])
|
||||
|
||||
AC_DEFUN([BASH_FUNC_STRCHRNUL],
|
||||
[
|
||||
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
||||
AC_CACHE_CHECK([whether strchrnul works],
|
||||
[bash_cv_func_strchrnul_works],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <string.h>
|
||||
]],
|
||||
[[const char *buf = "abc";
|
||||
return strchrnul (buf, 'd') != buf + 3;
|
||||
]]
|
||||
)],
|
||||
[bash_cv_func_strchrnul_works=yes], [bash_cv_func_strchrnul_works=no],
|
||||
[bash_cv_func_strchrnul_works=no]
|
||||
)])
|
||||
|
||||
if test "$bash_cv_func_strchrnul_works" = "no"; then
|
||||
AC_LIBOBJ([strchrnul])
|
||||
fi
|
||||
])
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor 'install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in "make install-strip", and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using 'strip' when the user
|
||||
# run "make install-strip". However 'strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the 'STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
|
||||
#if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
#fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
])
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
if test x"${install_sh+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
*)
|
||||
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
||||
esac
|
||||
fi
|
||||
AC_SUBST([install_sh])])
|
||||
|
||||
+23
-19
@@ -1422,6 +1422,22 @@ bash_spell_correct_shellword (int count, int key)
|
||||
#define COMMAND_SEPARATORS_PLUS_WS ";|&{(` \t"
|
||||
/* )} */
|
||||
|
||||
static inline int
|
||||
check_extglob (int ti)
|
||||
{
|
||||
#if defined (EXTENDED_GLOB)
|
||||
int this_char, prev_char;
|
||||
|
||||
this_char = rl_line_buffer[ti];
|
||||
prev_char = (ti > 0) ? rl_line_buffer[ti - 1] : 0;
|
||||
|
||||
if (extended_glob && ti > 0 && this_char == '(' && /*)*/
|
||||
member (prev_char, "?*+@!") && char_is_quoted (rl_line_buffer, ti - 1) == 0)
|
||||
return (1);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* check for redirections and other character combinations that are not
|
||||
command separators */
|
||||
static inline int
|
||||
@@ -1440,27 +1456,11 @@ check_redir (int ti)
|
||||
return (1);
|
||||
else if (this_char == '{' && prev_char == '$' && FUNSUB_CHAR (next_char) == 0) /*}*/
|
||||
return (1);
|
||||
#if 0 /* Not yet */
|
||||
else if (this_char == '(' && prev_char == '$') /*)*/
|
||||
return (1);
|
||||
else if (this_char == '(' && prev_char == '<') /*)*/
|
||||
return (1);
|
||||
#if defined (EXTENDED_GLOB)
|
||||
else if (extended_glob && this_char == '(' && prev_char == '!') /*)*/
|
||||
return (1);
|
||||
#endif
|
||||
#endif
|
||||
else if (char_is_quoted (rl_line_buffer, ti))
|
||||
return (1);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#if defined (PROGRAMMABLE_COMPLETION)
|
||||
/*
|
||||
* XXX - because of the <= start test, and setting os = s+1, this can
|
||||
* potentially return os > start. This is probably not what we want to
|
||||
* happen, but fix later after 2.05a-release.
|
||||
*/
|
||||
static int
|
||||
find_cmd_start (int start)
|
||||
{
|
||||
@@ -1638,9 +1638,13 @@ attempt_shell_completion (const char *text, int start, int end)
|
||||
}
|
||||
else if (member (rl_line_buffer[ti], command_separator_chars))
|
||||
{
|
||||
in_command_position++;
|
||||
if (char_is_quoted (rl_line_buffer, ti) == 0)
|
||||
in_command_position++;
|
||||
|
||||
if (check_redir (ti) == 1)
|
||||
if (in_command_position && rl_line_buffer[ti] == '(' && check_extglob (ti) == 1) /*)*/
|
||||
in_command_position = -1;
|
||||
|
||||
if (in_command_position && check_redir (ti) == 1)
|
||||
in_command_position = -1; /* sentinel that we're not the first word on the line */
|
||||
}
|
||||
else
|
||||
|
||||
@@ -783,8 +783,9 @@ comsub:
|
||||
commas++;
|
||||
}
|
||||
else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) &&
|
||||
text[i+2] != satisfy && level == 0)
|
||||
text[i+2] != satisfy && level == 0 && btype == BRACE_NONE)
|
||||
{
|
||||
/* The check against BRACE_NONE gives the comma higher precedence */
|
||||
btype = BRACE_SEQ;
|
||||
commas++;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
#define HAVE_RENAME
|
||||
|
||||
/* defining this implies a C23 environment */
|
||||
#undef HAVE_C_BOOL
|
||||
|
||||
/* Don't assume this; it's from C99; let syntax.h define a replacement */
|
||||
/* #undef HAVE_ISBLANK */
|
||||
|
||||
@@ -725,7 +725,8 @@ parse_string (char *string, const char *from_file, int flags, COMMAND **cmdp, ch
|
||||
|
||||
if (current_token == yacc_EOF || current_token == shell_eof_token)
|
||||
{
|
||||
if (current_token == shell_eof_token)
|
||||
/* check for EOFTOKEN out of paranoia */
|
||||
if ((parser_state & PST_EOFTOKEN) && (current_token == shell_eof_token))
|
||||
rewind_input_string ();
|
||||
break;
|
||||
}
|
||||
@@ -744,10 +745,10 @@ out:
|
||||
us, after doing cleanup */
|
||||
if (should_jump_to_top_level)
|
||||
{
|
||||
if (parse_and_execute_level == 0)
|
||||
top_level_cleanup ();
|
||||
if (code == DISCARD)
|
||||
return -DISCARD;
|
||||
if (parse_and_execute_level == 0)
|
||||
top_level_cleanup ();
|
||||
jump_to_top_level (code);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ Options:
|
||||
-c clear the history list by deleting all of the entries
|
||||
-d offset delete the history entry at position OFFSET. Negative
|
||||
offsets count back from the end of the history list
|
||||
-d start-end delete the history entries beginning at position START
|
||||
through position END.
|
||||
|
||||
-a append history lines from this session to the history file
|
||||
-n read all history lines not already read from the history file
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
# include <config.h>
|
||||
#else /* CROSS_COMPILING */
|
||||
/* A conservative set of defines based on POSIX/SUS3/XPG6 */
|
||||
# define HAVE_UNISTD_H
|
||||
# define HAVE_STRING_H
|
||||
# define HAVE_STDLIB_H
|
||||
|
||||
# define HAVE_RENAME
|
||||
# include <buildconf.h>
|
||||
#endif /* CROSS_COMPILING */
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
|
||||
+15
-9
@@ -1159,7 +1159,7 @@ static int
|
||||
read_mbchar (int fd, char *string, int ind, int ch, int delim, int unbuffered)
|
||||
{
|
||||
char mbchar[MB_LEN_MAX + 1];
|
||||
int i, n, r;
|
||||
int i, n, r, delim_ind;
|
||||
char c;
|
||||
size_t ret;
|
||||
mbstate_t ps, ps_back;
|
||||
@@ -1167,7 +1167,8 @@ read_mbchar (int fd, char *string, int ind, int ch, int delim, int unbuffered)
|
||||
|
||||
memset (&ps, '\0', sizeof (mbstate_t));
|
||||
memset (&ps_back, '\0', sizeof (mbstate_t));
|
||||
|
||||
|
||||
delim_ind = 0;
|
||||
mbchar[0] = ch;
|
||||
i = 1;
|
||||
for (n = 0; n <= MB_LEN_MAX; n++)
|
||||
@@ -1187,19 +1188,24 @@ read_mbchar (int fd, char *string, int ind, int ch, int delim, int unbuffered)
|
||||
r = zreadc (fd, &c);
|
||||
if (r <= 0)
|
||||
goto mbchar_return;
|
||||
if ((unsigned char)c == delim)
|
||||
delim_ind = i;
|
||||
mbchar[i++] = c;
|
||||
continue;
|
||||
}
|
||||
else if (ret == (size_t)-1)
|
||||
{
|
||||
/* If we read a delimiter character that makes this an invalid
|
||||
multibyte character, we can't just add it to the input string
|
||||
and treat it as a byte. We need to push it back so a subsequent
|
||||
zread will pick it up. */
|
||||
if ((unsigned char)c == delim)
|
||||
/* If we read (i > 1) a delimiter character (delim_ind >= 1)
|
||||
that is a part of this invalid multibyte character, we can't
|
||||
just add it to the input string and treat it as a byte.
|
||||
We need to push it and everything we read after it back so a
|
||||
subsequent zread will pick it up. */
|
||||
if (i > 1 && delim_ind >= 1)
|
||||
{
|
||||
zungetc ((unsigned char)c);
|
||||
mbchar[--i] = '\0'; /* unget the delimiter */
|
||||
size_t j;
|
||||
for (j = delim_ind; j < i; j++)
|
||||
zungetc ((unsigned char)mbchar[j]);
|
||||
i = delim_ind;
|
||||
}
|
||||
break; /* invalid multibyte character */
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ extern sh_builtin_func_t *this_shell_builtin;
|
||||
|
||||
$BUILTIN export
|
||||
$FUNCTION export_builtin
|
||||
$SHORT_DOC export [-fn] [name[=value] ...] or export -p
|
||||
$SHORT_DOC export [-fn] [name[=value] ...] or export -p [-f]
|
||||
Set export attribute for shell variables.
|
||||
|
||||
Marks each NAME for automatic export to the environment of subsequently
|
||||
@@ -59,7 +59,7 @@ executed commands. If VALUE is supplied, assign VALUE before exporting.
|
||||
Options:
|
||||
-f refer to shell functions
|
||||
-n remove the export property from each NAME
|
||||
-p display a list of all exported variables and functions
|
||||
-p display a list of all exported variables or functions
|
||||
|
||||
An argument of `--' disables further option processing.
|
||||
|
||||
|
||||
@@ -880,6 +880,9 @@
|
||||
/* Define if you have the snprintf function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define if you have the statfs function. */
|
||||
#undef HAVE_STATFS
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.3, version 5.076.
|
||||
# From configure.ac for Bash 5.3, version 5.080.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.72 for bash 5.3-rc1.
|
||||
# Generated by GNU Autoconf 2.72 for bash 5.3-rc2.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -605,8 +605,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='5.3-rc1'
|
||||
PACKAGE_STRING='bash 5.3-rc1'
|
||||
PACKAGE_VERSION='5.3-rc2'
|
||||
PACKAGE_STRING='bash 5.3-rc2'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -740,6 +740,9 @@ SED
|
||||
MKDIR_P
|
||||
SIZE
|
||||
MAKE_SHELL
|
||||
INSTALL_STRIP_PROGRAM
|
||||
STRIP
|
||||
install_sh
|
||||
SET_MAKE
|
||||
YFLAGS
|
||||
YACC
|
||||
@@ -1465,7 +1468,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
'configure' configures bash 5.3-rc1 to adapt to many kinds of systems.
|
||||
'configure' configures bash 5.3-rc2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1531,7 +1534,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 5.3-rc1:";;
|
||||
short | recursive ) echo "Configuration of bash 5.3-rc2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1739,7 +1742,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 5.3-rc1
|
||||
bash configure 5.3-rc2
|
||||
generated by GNU Autoconf 2.72
|
||||
|
||||
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||
@@ -2417,7 +2420,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 5.3-rc1, which was
|
||||
It was created by bash $as_me 5.3-rc2, which was
|
||||
generated by GNU Autoconf 2.72. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -3216,7 +3219,7 @@ ac_config_headers="$ac_config_headers config.h buildconf.h"
|
||||
|
||||
|
||||
BASHVERS=5.3
|
||||
RELSTATUS=rc1
|
||||
RELSTATUS=rc2
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -6407,6 +6410,132 @@ printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Expand $ac_aux_dir to an absolute path.
|
||||
am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
|
||||
if test x"${install_sh+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
*)
|
||||
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Installed binaries are usually stripped using 'strip' when the user
|
||||
# run "make install-strip". However 'strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the 'STRIP' environment variable to overrule this program.
|
||||
#if test "$cross_compiling" != no; then
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}strip; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_prog_STRIP+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if test -n "$STRIP"; then
|
||||
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
STRIP=$ac_cv_prog_STRIP
|
||||
if test -n "$STRIP"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
|
||||
printf "%s\n" "$STRIP" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_STRIP"; then
|
||||
ac_ct_STRIP=$STRIP
|
||||
# Extract the first word of "strip", so it can be a program name with args.
|
||||
set dummy strip; ac_word=$2
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
printf %s "checking for $ac_word... " >&6; }
|
||||
if test ${ac_cv_prog_ac_ct_STRIP+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if test -n "$ac_ct_STRIP"; then
|
||||
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
case $as_dir in #(((
|
||||
'') as_dir=./ ;;
|
||||
*/) ;;
|
||||
*) as_dir=$as_dir/ ;;
|
||||
esac
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_STRIP="strip"
|
||||
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi ;;
|
||||
esac
|
||||
fi
|
||||
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
|
||||
if test -n "$ac_ct_STRIP"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
|
||||
printf "%s\n" "$ac_ct_STRIP" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_STRIP" = x; then
|
||||
STRIP=":"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
STRIP=$ac_ct_STRIP
|
||||
fi
|
||||
else
|
||||
STRIP="$ac_cv_prog_STRIP"
|
||||
fi
|
||||
|
||||
#fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
|
||||
|
||||
case "$ac_cv_prog_YACC" in
|
||||
*bison*) ;;
|
||||
*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
|
||||
@@ -9228,8 +9357,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
LIBS=$save_LIBS
|
||||
test $gl_pthread_api = yes && break
|
||||
done
|
||||
echo "$as_me:9231: gl_pthread_api=$gl_pthread_api" >&5
|
||||
echo "$as_me:9232: LIBPTHREAD=$LIBPTHREAD" >&5
|
||||
echo "$as_me:9360: gl_pthread_api=$gl_pthread_api" >&5
|
||||
echo "$as_me:9361: LIBPTHREAD=$LIBPTHREAD" >&5
|
||||
|
||||
gl_pthread_in_glibc=no
|
||||
# On Linux with glibc >= 2.34, libc contains the fully functional
|
||||
@@ -9255,7 +9384,7 @@ rm -rf conftest*
|
||||
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:9258: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
|
||||
echo "$as_me:9387: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
|
||||
|
||||
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
|
||||
# since it is defined as a macro on OSF/1.)
|
||||
@@ -9433,7 +9562,7 @@ fi
|
||||
|
||||
fi
|
||||
fi
|
||||
echo "$as_me:9436: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
|
||||
echo "$as_me:9565: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
|
||||
printf %s "checking whether POSIX threads API is available... " >&6; }
|
||||
@@ -9680,8 +9809,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
LIBS=$save_LIBS
|
||||
test $gl_pthread_api = yes && break
|
||||
done
|
||||
echo "$as_me:9683: gl_pthread_api=$gl_pthread_api" >&5
|
||||
echo "$as_me:9684: LIBPTHREAD=$LIBPTHREAD" >&5
|
||||
echo "$as_me:9812: gl_pthread_api=$gl_pthread_api" >&5
|
||||
echo "$as_me:9813: LIBPTHREAD=$LIBPTHREAD" >&5
|
||||
|
||||
gl_pthread_in_glibc=no
|
||||
# On Linux with glibc >= 2.34, libc contains the fully functional
|
||||
@@ -9707,7 +9836,7 @@ rm -rf conftest*
|
||||
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:9710: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
|
||||
echo "$as_me:9839: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
|
||||
|
||||
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
|
||||
# since it is defined as a macro on OSF/1.)
|
||||
@@ -9885,7 +10014,7 @@ fi
|
||||
|
||||
fi
|
||||
fi
|
||||
echo "$as_me:9888: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
|
||||
echo "$as_me:10017: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
|
||||
printf %s "checking whether POSIX threads API is available... " >&6; }
|
||||
@@ -10655,7 +10784,6 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
|
||||
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
|
||||
printf %s "checking for shared library run path origin... " >&6; }
|
||||
if test ${acl_cv_rpath+y}
|
||||
@@ -15581,6 +15709,12 @@ if test "x$ac_cv_func_setitimer" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs"
|
||||
if test "x$ac_cv_func_statfs" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
|
||||
if test "x$ac_cv_func_tcgetpgrp" = xyes
|
||||
@@ -16174,21 +16308,6 @@ esac
|
||||
esac
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
|
||||
if test "x$ac_cv_func_strchrnul" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
|
||||
|
||||
else case e in #(
|
||||
e) case " $LIBOBJS " in
|
||||
*" strchrnul.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
|
||||
if test "x$ac_cv_func_strdup" = xyes
|
||||
then :
|
||||
@@ -18997,6 +19116,62 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
|
||||
printf %s "checking whether strchrnul works... " >&6; }
|
||||
if test ${bash_cv_func_strchrnul_works+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else case e in #(
|
||||
e) if test "$cross_compiling" = yes
|
||||
then :
|
||||
bash_cv_func_strchrnul_works=no
|
||||
|
||||
else case e in #(
|
||||
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
const char *buf = "abc";
|
||||
return strchrnul (buf, 'd') != buf + 3;
|
||||
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"
|
||||
then :
|
||||
bash_cv_func_strchrnul_works=yes
|
||||
else case e in #(
|
||||
e) bash_cv_func_strchrnul_works=no ;;
|
||||
esac
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strchrnul_works" >&5
|
||||
printf "%s\n" "$bash_cv_func_strchrnul_works" >&6; }
|
||||
|
||||
if test "$bash_cv_func_strchrnul_works" = "no"; then
|
||||
case " $LIBOBJS " in
|
||||
*" strchrnul.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
|
||||
printf %s "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
|
||||
if test ${bash_cv_dup2_broken+y}
|
||||
@@ -23639,7 +23814,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bash $as_me 5.3-rc1, which was
|
||||
This file was extended by bash $as_me 5.3-rc2, which was
|
||||
generated by GNU Autoconf 2.72. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -23707,7 +23882,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
bash config.status 5.3-rc1
|
||||
bash config.status 5.3-rc2
|
||||
configured by $0, generated by GNU Autoconf 2.72,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+10
-5
@@ -21,10 +21,10 @@ 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.3, version 5.076])dnl
|
||||
AC_REVISION([for Bash 5.3, version 5.080])dnl
|
||||
|
||||
define(bashvers, 5.3)
|
||||
define(relstatus, rc1)
|
||||
define(relstatus, rc2)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
@@ -32,7 +32,7 @@ dnl make sure we are using a recent autoconf version
|
||||
AC_PREREQ(2.69)
|
||||
|
||||
AC_CONFIG_SRCDIR(shell.h)
|
||||
dnl where to find install.sh, config.sub, and config.guess
|
||||
dnl where to find install-sh, config.sub, and config.guess
|
||||
AC_CONFIG_AUX_DIR(./support)
|
||||
AC_CONFIG_HEADERS(config.h buildconf.h)
|
||||
|
||||
@@ -695,6 +695,9 @@ AC_PROG_RANLIB
|
||||
AC_PROG_YACC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
|
||||
case "$ac_cv_prog_YACC" in
|
||||
*bison*) ;;
|
||||
*) AC_MSG_WARN([bison not available; needed to process parse.y]) ;;
|
||||
@@ -874,7 +877,8 @@ AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getentropy getgroups \
|
||||
gethostname getpagesize getpeername getrandom getrlimit \
|
||||
getrusage gettimeofday kill killpg lstat nanosleep \
|
||||
pselect readlink \
|
||||
select setdtablesize setitimer tcgetpgrp uname ulimit waitpid)
|
||||
select setdtablesize setitimer statfs \
|
||||
tcgetpgrp uname ulimit waitpid)
|
||||
AC_REPLACE_FUNCS(rename)
|
||||
|
||||
dnl checks for c library functions
|
||||
@@ -898,7 +902,6 @@ AC_REPLACE_FUNCS(getcwd memset)
|
||||
AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr)
|
||||
AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoumax)
|
||||
AC_REPLACE_FUNCS(dprintf)
|
||||
AC_REPLACE_FUNCS(strchrnul)
|
||||
AC_REPLACE_FUNCS(strdup)
|
||||
AC_REPLACE_FUNCS(strlcpy)
|
||||
AC_REPLACE_FUNCS(reallocarray)
|
||||
@@ -1049,6 +1052,8 @@ if test "$ac_cv_func_lstat" = "no"; then
|
||||
BASH_FUNC_LSTAT
|
||||
fi
|
||||
|
||||
BASH_FUNC_STRCHRNUL
|
||||
|
||||
dnl behavior of system calls and library functions
|
||||
BASH_FUNC_DUP2_CLOEXEC_CHECK
|
||||
BASH_SYS_PGRP_SYNC
|
||||
|
||||
+778
-772
File diff suppressed because it is too large
Load Diff
+15
-7
@@ -5,7 +5,7 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Mon Feb 24 16:09:49 EST 2025
|
||||
.\" Last Change: Mon Apr 7 16:59:13 EDT 2025
|
||||
.\"
|
||||
.\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section
|
||||
.\" For rbash, strip all but "RESTRICTED SHELL" section
|
||||
@@ -21,7 +21,7 @@
|
||||
.ds zY \" empty
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2025 February 24" "GNU Bash 5.3"
|
||||
.TH BASH 1 "2025 April 7" "GNU Bash 5.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -1449,7 +1449,7 @@ is applied to an array variable using compound assignment
|
||||
below),
|
||||
the variable's value is not unset
|
||||
(as it is when using
|
||||
.@ = ),
|
||||
.Q = ),
|
||||
and new values are appended to the array
|
||||
beginning at one greater than the array's maximum index (for indexed arrays)
|
||||
or added as additional key\-value pairs in an associative array.
|
||||
@@ -2617,8 +2617,13 @@ the shell does not save the command history when it exits.
|
||||
.B HISTFILESIZE
|
||||
The maximum number of lines contained in the history file.
|
||||
When this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines
|
||||
if necessary, to contain no more than
|
||||
the number of history entries
|
||||
that total no more than that number of lines
|
||||
by removing the oldest entries.
|
||||
If the history list contains multi-line entries,
|
||||
the history file may contain more lines than this maximum
|
||||
to avoid leaving partial history entries.
|
||||
The history file is also truncated to this size after
|
||||
writing it when a shell exits or by the
|
||||
.B \%history
|
||||
@@ -10174,7 +10179,7 @@ is executed before the shell terminates.
|
||||
\fBexport\fP [\fB\-fn\fP\^] [\fIname\fP[=\fIvalue\fP]] .\|.\|.
|
||||
.PD 0
|
||||
.TP
|
||||
.B export \-p
|
||||
.B export \-p [\fB\-f\fP\^]
|
||||
.PD
|
||||
The supplied
|
||||
.I names
|
||||
@@ -10191,10 +10196,13 @@ The
|
||||
option unexports, or removes the export attribute, from each \fIname\fP.
|
||||
If no
|
||||
.I names
|
||||
are given, or if the
|
||||
are given, or if only the
|
||||
.B \-p
|
||||
option is supplied, \fBexport\fP prints a list of names of all exported
|
||||
option is supplied,
|
||||
\fBexport\fP displays a list of names of all exported
|
||||
variables on the standard output.
|
||||
Using \fB\-p\fP and \fB\-f\fP together displays exported functions.
|
||||
The \fB\-p\fP option displays output in a form that may be reused as input.
|
||||
.IP
|
||||
\fBexport\fP allows the value of a variable to be set when it is exported
|
||||
or unexported by following the variable name with =\fIvalue\fP.
|
||||
|
||||
+16
-8
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2025 February 24<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2025 April 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -3291,8 +3291,13 @@ the shell does not save the command history when it exits.
|
||||
<DD>
|
||||
The maximum number of lines contained in the history file.
|
||||
When this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines
|
||||
if necessary, to contain no more than
|
||||
the number of history entries
|
||||
that total no more than that number of lines
|
||||
by removing the oldest entries.
|
||||
If the history list contains multi-line entries,
|
||||
the history file may contain more lines than this maximum
|
||||
to avoid leaving partial history entries.
|
||||
The history file is also truncated to this size after
|
||||
writing it when a shell exits or by the
|
||||
<B>history</B>
|
||||
@@ -12740,7 +12745,7 @@ Any trap on
|
||||
is executed before the shell terminates.
|
||||
<DT><B>export</B> [<B>-fn</B>] [<I>name</I>[=<I>value</I>]] ...<DD>
|
||||
|
||||
<DT><B>export -p</B>
|
||||
<DT><B>export -p [-f</B>]
|
||||
|
||||
<DD>
|
||||
|
||||
@@ -12764,11 +12769,14 @@ option unexports, or removes the export attribute, from each <I>name</I>.
|
||||
If no
|
||||
<I>names</I>
|
||||
|
||||
are given, or if the
|
||||
are given, or if only the
|
||||
<B>-p</B>
|
||||
|
||||
option is supplied, <B>export</B> prints a list of names of all exported
|
||||
option is supplied,
|
||||
<B>export</B> displays a list of names of all exported
|
||||
variables on the standard output.
|
||||
Using <B>-p</B> and <B>-f</B> together displays exported functions.
|
||||
The <B>-p</B> option displays output in a form that may be reused as input.
|
||||
<DT><DD>
|
||||
<B>export</B> allows the value of a variable to be set when it is exported
|
||||
or unexported by following the variable name with =<I>value</I>.
|
||||
@@ -16813,7 +16821,7 @@ Array variables may not (yet) be exported.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2025 February 24<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2025 April 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -16922,7 +16930,7 @@ Array variables may not (yet) be exported.
|
||||
<DT><A HREF="#lbDJ">BUGS</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 31 March 2025 10:28:01 EDT
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20250502/doc/bash.1.<BR>
|
||||
Time: 04 May 2025 17:25:09 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+213
-209
@@ -1,9 +1,9 @@
|
||||
This is bash.info, produced by makeinfo version 7.1 from bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 24 February 2025).
|
||||
Bash shell (version 5.3, 7 April 2025).
|
||||
|
||||
This is Edition 5.3, last updated 24 February 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 7 April 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2025 Free Software Foundation, Inc.
|
||||
@@ -26,10 +26,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 24 February 2025). The Bash home page is
|
||||
Bash shell (version 5.3, 7 April 2025). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 24 February 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 7 April 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3597,9 +3597,10 @@ standard.
|
||||
to shell functions; otherwise the names refer to shell variables.
|
||||
|
||||
The ‘-n’ option means to unexport each name: no longer mark it for
|
||||
export. If no NAMEs are supplied, or if the ‘-p’ option is given,
|
||||
‘export’ displays a list of names of all exported variables on the
|
||||
standard output. The ‘-p’ option displays output in a form that
|
||||
export. If no NAMEs are supplied, or if only the ‘-p’ option is
|
||||
given, ‘export’ displays a list of names of all exported variables
|
||||
on the standard output. Using ‘-p’ and ‘-f’ together displays
|
||||
exported functions. The ‘-p’ option displays output in a form that
|
||||
may be reused as input.
|
||||
|
||||
‘export’ allows the value of a variable to be set at the same time
|
||||
@@ -6104,13 +6105,16 @@ Variables::).
|
||||
‘HISTFILESIZE’
|
||||
The maximum number of lines contained in the history file. When
|
||||
this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines by
|
||||
removing the oldest entries. The history file is also truncated to
|
||||
this size after writing it when a shell exits or by the ‘history’
|
||||
builtin. If the value is 0, the history file is truncated to zero
|
||||
size. Non-numeric values and numeric values less than zero inhibit
|
||||
truncation. The shell sets the default value to the value of
|
||||
‘HISTSIZE’ after reading any startup files.
|
||||
if necessary, to contain no more than the number of history entries
|
||||
that total no more than that number of lines by removing the oldest
|
||||
entries. If the history list contains multi-line entries, the
|
||||
history file may contain more lines than this maximum to avoid
|
||||
leaving partial history entries. The history file is also
|
||||
truncated to this size after writing it when a shell exits or by
|
||||
the ‘history’ builtin. If the value is 0, the history file is
|
||||
truncated to zero size. Non-numeric values and numeric values less
|
||||
than zero inhibit truncation. The shell sets the default value to
|
||||
the value of ‘HISTSIZE’ after reading any startup files.
|
||||
|
||||
‘HISTIGNORE’
|
||||
A colon-separated list of patterns used to decide which command
|
||||
@@ -12825,7 +12829,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* .: Bourne Shell Builtins.
|
||||
(line 17)
|
||||
* [: Bourne Shell Builtins.
|
||||
(line 338)
|
||||
(line 339)
|
||||
* alias: Bash Builtins. (line 11)
|
||||
* bg: Job Control Builtins.
|
||||
(line 7)
|
||||
@@ -12861,15 +12865,15 @@ D.1 Index of Shell Builtin Commands
|
||||
* export: Bourne Shell Builtins.
|
||||
(line 152)
|
||||
* false: Bourne Shell Builtins.
|
||||
(line 174)
|
||||
(line 175)
|
||||
* fc: Bash History Builtins.
|
||||
(line 10)
|
||||
* fg: Job Control Builtins.
|
||||
(line 17)
|
||||
* getopts: Bourne Shell Builtins.
|
||||
(line 179)
|
||||
(line 180)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 231)
|
||||
(line 232)
|
||||
* help: Bash Builtins. (line 375)
|
||||
* history: Bash History Builtins.
|
||||
(line 59)
|
||||
@@ -12885,38 +12889,38 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 37)
|
||||
* printf: Bash Builtins. (line 488)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 70)
|
||||
(line 71)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 263)
|
||||
(line 264)
|
||||
* read: Bash Builtins. (line 558)
|
||||
* readarray: Bash Builtins. (line 669)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 275)
|
||||
(line 276)
|
||||
* return: Bourne Shell Builtins.
|
||||
(line 300)
|
||||
(line 301)
|
||||
* set: The Set Builtin. (line 11)
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 325)
|
||||
(line 326)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 678)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 139)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 338)
|
||||
(line 339)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 438)
|
||||
(line 439)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 444)
|
||||
(line 445)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 510)
|
||||
(line 511)
|
||||
* type: Bash Builtins. (line 683)
|
||||
* typeset: Bash Builtins. (line 720)
|
||||
* ulimit: Bash Builtins. (line 726)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 515)
|
||||
(line 516)
|
||||
* unalias: Bash Builtins. (line 834)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 533)
|
||||
(line 534)
|
||||
* wait: Job Control Builtins.
|
||||
(line 86)
|
||||
|
||||
@@ -13093,51 +13097,51 @@ D.3 Parameter and Variable Index
|
||||
* HISTCONTROL: Bash Variables. (line 443)
|
||||
* HISTFILE: Bash Variables. (line 461)
|
||||
* HISTFILESIZE: Bash Variables. (line 467)
|
||||
* HISTIGNORE: Bash Variables. (line 478)
|
||||
* HISTIGNORE: Bash Variables. (line 481)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 234)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 240)
|
||||
* HISTSIZE: Bash Variables. (line 502)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 509)
|
||||
* HISTSIZE: Bash Variables. (line 505)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 512)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 250)
|
||||
* HOSTFILE: Bash Variables. (line 518)
|
||||
* HOSTNAME: Bash Variables. (line 529)
|
||||
* HOSTTYPE: Bash Variables. (line 532)
|
||||
* HOSTFILE: Bash Variables. (line 521)
|
||||
* HOSTNAME: Bash Variables. (line 532)
|
||||
* HOSTTYPE: Bash Variables. (line 535)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 535)
|
||||
* IGNOREEOF: Bash Variables. (line 538)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 258)
|
||||
* INPUTRC: Bash Variables. (line 544)
|
||||
* INSIDE_EMACS: Bash Variables. (line 548)
|
||||
* INPUTRC: Bash Variables. (line 547)
|
||||
* INSIDE_EMACS: Bash Variables. (line 551)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 269)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 276)
|
||||
* LANG: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LANG <1>: Bash Variables. (line 554)
|
||||
* LC_ALL: Bash Variables. (line 558)
|
||||
* LC_COLLATE: Bash Variables. (line 562)
|
||||
* LC_CTYPE: Bash Variables. (line 569)
|
||||
* LANG <1>: Bash Variables. (line 557)
|
||||
* LC_ALL: Bash Variables. (line 561)
|
||||
* LC_COLLATE: Bash Variables. (line 565)
|
||||
* LC_CTYPE: Bash Variables. (line 572)
|
||||
* LC_MESSAGES: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 574)
|
||||
* LC_NUMERIC: Bash Variables. (line 578)
|
||||
* LC_TIME: Bash Variables. (line 582)
|
||||
* LINENO: Bash Variables. (line 586)
|
||||
* LINES: Bash Variables. (line 593)
|
||||
* MACHTYPE: Bash Variables. (line 599)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 577)
|
||||
* LC_NUMERIC: Bash Variables. (line 581)
|
||||
* LC_TIME: Bash Variables. (line 585)
|
||||
* LINENO: Bash Variables. (line 589)
|
||||
* LINES: Bash Variables. (line 596)
|
||||
* MACHTYPE: Bash Variables. (line 602)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 24)
|
||||
* MAILCHECK: Bash Variables. (line 603)
|
||||
* MAILCHECK: Bash Variables. (line 606)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 29)
|
||||
* MAPFILE: Bash Variables. (line 611)
|
||||
* MAPFILE: Bash Variables. (line 614)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 306)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
@@ -13148,46 +13152,46 @@ D.3 Parameter and Variable Index
|
||||
(line 323)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 258)
|
||||
* OLDPWD: Bash Variables. (line 615)
|
||||
* OLDPWD: Bash Variables. (line 618)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 36)
|
||||
* OPTERR: Bash Variables. (line 618)
|
||||
* OPTERR: Bash Variables. (line 621)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 40)
|
||||
* OSTYPE: Bash Variables. (line 623)
|
||||
* OSTYPE: Bash Variables. (line 626)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 328)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 337)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 44)
|
||||
* PIPESTATUS: Bash Variables. (line 626)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 636)
|
||||
* PPID: Bash Variables. (line 646)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 650)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 656)
|
||||
* PS0: Bash Variables. (line 662)
|
||||
* PIPESTATUS: Bash Variables. (line 629)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 639)
|
||||
* PPID: Bash Variables. (line 649)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 653)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 659)
|
||||
* PS0: Bash Variables. (line 665)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 58)
|
||||
* PS3: Bash Variables. (line 667)
|
||||
* PS4: Bash Variables. (line 672)
|
||||
* PWD: Bash Variables. (line 680)
|
||||
* RANDOM: Bash Variables. (line 683)
|
||||
* READLINE_ARGUMENT: Bash Variables. (line 691)
|
||||
* READLINE_LINE: Bash Variables. (line 695)
|
||||
* READLINE_MARK: Bash Variables. (line 699)
|
||||
* READLINE_POINT: Bash Variables. (line 705)
|
||||
* REPLY: Bash Variables. (line 709)
|
||||
* PS3: Bash Variables. (line 670)
|
||||
* PS4: Bash Variables. (line 675)
|
||||
* PWD: Bash Variables. (line 683)
|
||||
* RANDOM: Bash Variables. (line 686)
|
||||
* READLINE_ARGUMENT: Bash Variables. (line 694)
|
||||
* READLINE_LINE: Bash Variables. (line 698)
|
||||
* READLINE_MARK: Bash Variables. (line 702)
|
||||
* READLINE_POINT: Bash Variables. (line 708)
|
||||
* REPLY: Bash Variables. (line 712)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 350)
|
||||
* search-ignore-case: Readline Init File Syntax.
|
||||
(line 357)
|
||||
* SECONDS: Bash Variables. (line 713)
|
||||
* SHELL: Bash Variables. (line 723)
|
||||
* SHELLOPTS: Bash Variables. (line 728)
|
||||
* SHLVL: Bash Variables. (line 738)
|
||||
* SECONDS: Bash Variables. (line 716)
|
||||
* SHELL: Bash Variables. (line 726)
|
||||
* SHELLOPTS: Bash Variables. (line 731)
|
||||
* SHLVL: Bash Variables. (line 741)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 362)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
@@ -13196,15 +13200,15 @@ D.3 Parameter and Variable Index
|
||||
(line 377)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 383)
|
||||
* SRANDOM: Bash Variables. (line 743)
|
||||
* SRANDOM: Bash Variables. (line 746)
|
||||
* TEXTDOMAIN: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* TEXTDOMAINDIR: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* TIMEFORMAT: Bash Variables. (line 752)
|
||||
* TMOUT: Bash Variables. (line 791)
|
||||
* TMPDIR: Bash Variables. (line 803)
|
||||
* UID: Bash Variables. (line 807)
|
||||
* TIMEFORMAT: Bash Variables. (line 755)
|
||||
* TMOUT: Bash Variables. (line 794)
|
||||
* TMPDIR: Bash Variables. (line 806)
|
||||
* UID: Bash Variables. (line 810)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 396)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
@@ -13599,138 +13603,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top901
|
||||
Node: Introduction2842
|
||||
Node: What is Bash?3055
|
||||
Node: What is a shell?4188
|
||||
Node: Definitions6798
|
||||
Node: Basic Shell Features10125
|
||||
Node: Shell Syntax11349
|
||||
Node: Shell Operation12376
|
||||
Node: Quoting13667
|
||||
Node: Escape Character15005
|
||||
Node: Single Quotes15540
|
||||
Node: Double Quotes15889
|
||||
Node: ANSI-C Quoting17234
|
||||
Node: Locale Translation18628
|
||||
Node: Creating Internationalized Scripts20031
|
||||
Node: Comments24229
|
||||
Node: Shell Commands24996
|
||||
Node: Reserved Words25935
|
||||
Node: Simple Commands26800
|
||||
Node: Pipelines27462
|
||||
Node: Lists30718
|
||||
Node: Compound Commands32590
|
||||
Node: Looping Constructs33599
|
||||
Node: Conditional Constructs36148
|
||||
Node: Command Grouping51218
|
||||
Node: Coprocesses52710
|
||||
Node: GNU Parallel55396
|
||||
Node: Shell Functions56314
|
||||
Node: Shell Parameters64762
|
||||
Node: Positional Parameters69663
|
||||
Node: Special Parameters70753
|
||||
Node: Shell Expansions74214
|
||||
Node: Brace Expansion76403
|
||||
Node: Tilde Expansion79739
|
||||
Node: Shell Parameter Expansion82694
|
||||
Node: Command Substitution103337
|
||||
Node: Arithmetic Expansion106866
|
||||
Node: Process Substitution108042
|
||||
Node: Word Splitting109150
|
||||
Node: Filename Expansion111594
|
||||
Node: Pattern Matching114818
|
||||
Node: Quote Removal120541
|
||||
Node: Redirections120845
|
||||
Node: Executing Commands131108
|
||||
Node: Simple Command Expansion131775
|
||||
Node: Command Search and Execution133883
|
||||
Node: Command Execution Environment136327
|
||||
Node: Environment139775
|
||||
Node: Exit Status141678
|
||||
Node: Signals143736
|
||||
Node: Shell Scripts148665
|
||||
Node: Shell Builtin Commands151963
|
||||
Node: Bourne Shell Builtins154074
|
||||
Node: Bash Builtins180644
|
||||
Node: Modifying Shell Behavior217568
|
||||
Node: The Set Builtin217910
|
||||
Node: The Shopt Builtin229904
|
||||
Node: Special Builtins246956
|
||||
Node: Shell Variables247945
|
||||
Node: Bourne Shell Variables248379
|
||||
Node: Bash Variables250887
|
||||
Node: Bash Features289792
|
||||
Node: Invoking Bash290806
|
||||
Node: Bash Startup Files297390
|
||||
Node: Interactive Shells302632
|
||||
Node: What is an Interactive Shell?303040
|
||||
Node: Is this Shell Interactive?303702
|
||||
Node: Interactive Shell Behavior304526
|
||||
Node: Bash Conditional Expressions308287
|
||||
Node: Shell Arithmetic313704
|
||||
Node: Aliases317033
|
||||
Node: Arrays320167
|
||||
Node: The Directory Stack327755
|
||||
Node: Directory Stack Builtins328552
|
||||
Node: Controlling the Prompt332997
|
||||
Node: The Restricted Shell335882
|
||||
Node: Bash POSIX Mode338764
|
||||
Node: Shell Compatibility Mode357121
|
||||
Node: Job Control366128
|
||||
Node: Job Control Basics366585
|
||||
Node: Job Control Builtins372953
|
||||
Node: Job Control Variables379635
|
||||
Node: Command Line Editing380866
|
||||
Node: Introduction and Notation382569
|
||||
Node: Readline Interaction384921
|
||||
Node: Readline Bare Essentials386109
|
||||
Node: Readline Movement Commands387917
|
||||
Node: Readline Killing Commands388913
|
||||
Node: Readline Arguments390936
|
||||
Node: Searching391993
|
||||
Node: Readline Init File394236
|
||||
Node: Readline Init File Syntax395539
|
||||
Node: Conditional Init Constructs422364
|
||||
Node: Sample Init File426749
|
||||
Node: Bindable Readline Commands429869
|
||||
Node: Commands For Moving431407
|
||||
Node: Commands For History433871
|
||||
Node: Commands For Text439261
|
||||
Node: Commands For Killing443386
|
||||
Node: Numeric Arguments446174
|
||||
Node: Commands For Completion447326
|
||||
Node: Keyboard Macros453022
|
||||
Node: Miscellaneous Commands453723
|
||||
Node: Readline vi Mode460290
|
||||
Node: Programmable Completion461267
|
||||
Node: Programmable Completion Builtins470004
|
||||
Node: A Programmable Completion Example481741
|
||||
Node: Using History Interactively487086
|
||||
Node: Bash History Facilities487767
|
||||
Node: Bash History Builtins491502
|
||||
Node: History Interaction497973
|
||||
Node: Event Designators502923
|
||||
Node: Word Designators504501
|
||||
Node: Modifiers506893
|
||||
Node: Installing Bash508830
|
||||
Node: Basic Installation509946
|
||||
Node: Compilers and Options513822
|
||||
Node: Compiling For Multiple Architectures514572
|
||||
Node: Installation Names516325
|
||||
Node: Specifying the System Type518559
|
||||
Node: Sharing Defaults519305
|
||||
Node: Operation Controls520019
|
||||
Node: Optional Features521038
|
||||
Node: Reporting Bugs533418
|
||||
Node: Major Differences From The Bourne Shell534775
|
||||
Node: GNU Free Documentation License556201
|
||||
Node: Indexes581378
|
||||
Node: Builtin Index581829
|
||||
Node: Reserved Word Index588927
|
||||
Node: Variable Index591372
|
||||
Node: Function Index608785
|
||||
Node: Concept Index622780
|
||||
Node: Top893
|
||||
Node: Introduction2826
|
||||
Node: What is Bash?3039
|
||||
Node: What is a shell?4172
|
||||
Node: Definitions6782
|
||||
Node: Basic Shell Features10109
|
||||
Node: Shell Syntax11333
|
||||
Node: Shell Operation12360
|
||||
Node: Quoting13651
|
||||
Node: Escape Character14989
|
||||
Node: Single Quotes15524
|
||||
Node: Double Quotes15873
|
||||
Node: ANSI-C Quoting17218
|
||||
Node: Locale Translation18612
|
||||
Node: Creating Internationalized Scripts20015
|
||||
Node: Comments24213
|
||||
Node: Shell Commands24980
|
||||
Node: Reserved Words25919
|
||||
Node: Simple Commands26784
|
||||
Node: Pipelines27446
|
||||
Node: Lists30702
|
||||
Node: Compound Commands32574
|
||||
Node: Looping Constructs33583
|
||||
Node: Conditional Constructs36132
|
||||
Node: Command Grouping51202
|
||||
Node: Coprocesses52694
|
||||
Node: GNU Parallel55380
|
||||
Node: Shell Functions56298
|
||||
Node: Shell Parameters64746
|
||||
Node: Positional Parameters69647
|
||||
Node: Special Parameters70737
|
||||
Node: Shell Expansions74198
|
||||
Node: Brace Expansion76387
|
||||
Node: Tilde Expansion79723
|
||||
Node: Shell Parameter Expansion82678
|
||||
Node: Command Substitution103321
|
||||
Node: Arithmetic Expansion106850
|
||||
Node: Process Substitution108026
|
||||
Node: Word Splitting109134
|
||||
Node: Filename Expansion111578
|
||||
Node: Pattern Matching114802
|
||||
Node: Quote Removal120525
|
||||
Node: Redirections120829
|
||||
Node: Executing Commands131092
|
||||
Node: Simple Command Expansion131759
|
||||
Node: Command Search and Execution133867
|
||||
Node: Command Execution Environment136311
|
||||
Node: Environment139759
|
||||
Node: Exit Status141662
|
||||
Node: Signals143720
|
||||
Node: Shell Scripts148649
|
||||
Node: Shell Builtin Commands151947
|
||||
Node: Bourne Shell Builtins154058
|
||||
Node: Bash Builtins180705
|
||||
Node: Modifying Shell Behavior217629
|
||||
Node: The Set Builtin217971
|
||||
Node: The Shopt Builtin229965
|
||||
Node: Special Builtins247017
|
||||
Node: Shell Variables248006
|
||||
Node: Bourne Shell Variables248440
|
||||
Node: Bash Variables250948
|
||||
Node: Bash Features290072
|
||||
Node: Invoking Bash291086
|
||||
Node: Bash Startup Files297670
|
||||
Node: Interactive Shells302912
|
||||
Node: What is an Interactive Shell?303320
|
||||
Node: Is this Shell Interactive?303982
|
||||
Node: Interactive Shell Behavior304806
|
||||
Node: Bash Conditional Expressions308567
|
||||
Node: Shell Arithmetic313984
|
||||
Node: Aliases317313
|
||||
Node: Arrays320447
|
||||
Node: The Directory Stack328035
|
||||
Node: Directory Stack Builtins328832
|
||||
Node: Controlling the Prompt333277
|
||||
Node: The Restricted Shell336162
|
||||
Node: Bash POSIX Mode339044
|
||||
Node: Shell Compatibility Mode357401
|
||||
Node: Job Control366408
|
||||
Node: Job Control Basics366865
|
||||
Node: Job Control Builtins373233
|
||||
Node: Job Control Variables379915
|
||||
Node: Command Line Editing381146
|
||||
Node: Introduction and Notation382849
|
||||
Node: Readline Interaction385201
|
||||
Node: Readline Bare Essentials386389
|
||||
Node: Readline Movement Commands388197
|
||||
Node: Readline Killing Commands389193
|
||||
Node: Readline Arguments391216
|
||||
Node: Searching392273
|
||||
Node: Readline Init File394516
|
||||
Node: Readline Init File Syntax395819
|
||||
Node: Conditional Init Constructs422644
|
||||
Node: Sample Init File427029
|
||||
Node: Bindable Readline Commands430149
|
||||
Node: Commands For Moving431687
|
||||
Node: Commands For History434151
|
||||
Node: Commands For Text439541
|
||||
Node: Commands For Killing443666
|
||||
Node: Numeric Arguments446454
|
||||
Node: Commands For Completion447606
|
||||
Node: Keyboard Macros453302
|
||||
Node: Miscellaneous Commands454003
|
||||
Node: Readline vi Mode460570
|
||||
Node: Programmable Completion461547
|
||||
Node: Programmable Completion Builtins470284
|
||||
Node: A Programmable Completion Example482021
|
||||
Node: Using History Interactively487366
|
||||
Node: Bash History Facilities488047
|
||||
Node: Bash History Builtins491782
|
||||
Node: History Interaction498253
|
||||
Node: Event Designators503203
|
||||
Node: Word Designators504781
|
||||
Node: Modifiers507173
|
||||
Node: Installing Bash509110
|
||||
Node: Basic Installation510226
|
||||
Node: Compilers and Options514102
|
||||
Node: Compiling For Multiple Architectures514852
|
||||
Node: Installation Names516605
|
||||
Node: Specifying the System Type518839
|
||||
Node: Sharing Defaults519585
|
||||
Node: Operation Controls520299
|
||||
Node: Optional Features521318
|
||||
Node: Reporting Bugs533698
|
||||
Node: Major Differences From The Bourne Shell535055
|
||||
Node: GNU Free Documentation License556481
|
||||
Node: Indexes581658
|
||||
Node: Builtin Index582109
|
||||
Node: Reserved Word Index589207
|
||||
Node: Variable Index591652
|
||||
Node: Function Index609065
|
||||
Node: Concept Index623060
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+15
-8
@@ -4,9 +4,9 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- This text is a brief description of the features that are present in
|
||||
the Bash shell (version 5.3, 24 February 2025).
|
||||
the Bash shell (version 5.3, 7 April 2025).
|
||||
|
||||
This is Edition 5.3, last updated 24 February 2025,
|
||||
This is Edition 5.3, last updated 7 April 2025,
|
||||
of The GNU Bash Reference Manual,
|
||||
for Bash, Version 5.3.
|
||||
|
||||
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
|
||||
<h1 class="top" id="Bash-Features-1"><span>Bash Features<a class="copiable-link" href="#Bash-Features-1"> ¶</a></span></h1>
|
||||
|
||||
<p>This text is a brief description of the features that are present in
|
||||
the Bash shell (version 5.3, 24 February 2025).
|
||||
the Bash shell (version 5.3, 7 April 2025).
|
||||
The Bash home page is <a class="url" href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
|
||||
</p>
|
||||
<p>This is Edition 5.3, last updated 24 February 2025,
|
||||
<p>This is Edition 5.3, last updated 7 April 2025,
|
||||
of <cite class="cite">The GNU Bash Reference Manual</cite>,
|
||||
for <code class="code">Bash</code>, Version 5.3.
|
||||
</p>
|
||||
@@ -4887,9 +4887,11 @@ refer to shell functions; otherwise the names refer to shell variables.
|
||||
</p>
|
||||
<p>The <samp class="option">-n</samp> option means to unexport each name: no longer mark
|
||||
it for export.
|
||||
If no <var class="var">name</var>s are supplied, or if the <samp class="option">-p</samp> option is given,
|
||||
<code class="code">export</code> displays a list of names of all exported variables on the
|
||||
standard output.
|
||||
If no <var class="var">name</var>s are supplied, or if only
|
||||
the <samp class="option">-p</samp> option is given,
|
||||
<code class="code">export</code> displays a list of names of all exported
|
||||
variables on the standard output.
|
||||
Using <samp class="option">-p</samp> and <samp class="option">-f</samp> together displays exported functions.
|
||||
The <samp class="option">-p</samp> option displays output in a form that may be reused as input.
|
||||
</p>
|
||||
<p><code class="code">export</code> allows the value of a variable to be set at the same time
|
||||
@@ -8107,8 +8109,13 @@ the shell does not save the command history when it exits.
|
||||
<dt><a id="index-HISTFILESIZE"></a><span><code class="code">HISTFILESIZE</code><a class="copiable-link" href="#index-HISTFILESIZE"> ¶</a></span></dt>
|
||||
<dd><p>The maximum number of lines contained in the history file.
|
||||
When this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines
|
||||
if necessary, to contain no more than
|
||||
the number of history entries
|
||||
that total no more than that number of lines
|
||||
by removing the oldest entries.
|
||||
If the history list contains multi-line entries,
|
||||
the history file may contain more lines than this maximum
|
||||
to avoid leaving partial history entries.
|
||||
The history file is also truncated to this size after
|
||||
writing it when a shell exits or by the <code class="code">history</code> builtin.
|
||||
If the value is 0, the history file is truncated to zero size.
|
||||
|
||||
+213
-209
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.1 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 24 February 2025).
|
||||
Bash shell (version 5.3, 7 April 2025).
|
||||
|
||||
This is Edition 5.3, last updated 24 February 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 7 April 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2025 Free Software Foundation, Inc.
|
||||
@@ -27,10 +27,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 24 February 2025). The Bash home page is
|
||||
Bash shell (version 5.3, 7 April 2025). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 24 February 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 7 April 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3598,9 +3598,10 @@ standard.
|
||||
to shell functions; otherwise the names refer to shell variables.
|
||||
|
||||
The ‘-n’ option means to unexport each name: no longer mark it for
|
||||
export. If no NAMEs are supplied, or if the ‘-p’ option is given,
|
||||
‘export’ displays a list of names of all exported variables on the
|
||||
standard output. The ‘-p’ option displays output in a form that
|
||||
export. If no NAMEs are supplied, or if only the ‘-p’ option is
|
||||
given, ‘export’ displays a list of names of all exported variables
|
||||
on the standard output. Using ‘-p’ and ‘-f’ together displays
|
||||
exported functions. The ‘-p’ option displays output in a form that
|
||||
may be reused as input.
|
||||
|
||||
‘export’ allows the value of a variable to be set at the same time
|
||||
@@ -6105,13 +6106,16 @@ Variables::).
|
||||
‘HISTFILESIZE’
|
||||
The maximum number of lines contained in the history file. When
|
||||
this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines by
|
||||
removing the oldest entries. The history file is also truncated to
|
||||
this size after writing it when a shell exits or by the ‘history’
|
||||
builtin. If the value is 0, the history file is truncated to zero
|
||||
size. Non-numeric values and numeric values less than zero inhibit
|
||||
truncation. The shell sets the default value to the value of
|
||||
‘HISTSIZE’ after reading any startup files.
|
||||
if necessary, to contain no more than the number of history entries
|
||||
that total no more than that number of lines by removing the oldest
|
||||
entries. If the history list contains multi-line entries, the
|
||||
history file may contain more lines than this maximum to avoid
|
||||
leaving partial history entries. The history file is also
|
||||
truncated to this size after writing it when a shell exits or by
|
||||
the ‘history’ builtin. If the value is 0, the history file is
|
||||
truncated to zero size. Non-numeric values and numeric values less
|
||||
than zero inhibit truncation. The shell sets the default value to
|
||||
the value of ‘HISTSIZE’ after reading any startup files.
|
||||
|
||||
‘HISTIGNORE’
|
||||
A colon-separated list of patterns used to decide which command
|
||||
@@ -12826,7 +12830,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* .: Bourne Shell Builtins.
|
||||
(line 17)
|
||||
* [: Bourne Shell Builtins.
|
||||
(line 338)
|
||||
(line 339)
|
||||
* alias: Bash Builtins. (line 11)
|
||||
* bg: Job Control Builtins.
|
||||
(line 7)
|
||||
@@ -12862,15 +12866,15 @@ D.1 Index of Shell Builtin Commands
|
||||
* export: Bourne Shell Builtins.
|
||||
(line 152)
|
||||
* false: Bourne Shell Builtins.
|
||||
(line 174)
|
||||
(line 175)
|
||||
* fc: Bash History Builtins.
|
||||
(line 10)
|
||||
* fg: Job Control Builtins.
|
||||
(line 17)
|
||||
* getopts: Bourne Shell Builtins.
|
||||
(line 179)
|
||||
(line 180)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 231)
|
||||
(line 232)
|
||||
* help: Bash Builtins. (line 375)
|
||||
* history: Bash History Builtins.
|
||||
(line 59)
|
||||
@@ -12886,38 +12890,38 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 37)
|
||||
* printf: Bash Builtins. (line 488)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 70)
|
||||
(line 71)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 263)
|
||||
(line 264)
|
||||
* read: Bash Builtins. (line 558)
|
||||
* readarray: Bash Builtins. (line 669)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 275)
|
||||
(line 276)
|
||||
* return: Bourne Shell Builtins.
|
||||
(line 300)
|
||||
(line 301)
|
||||
* set: The Set Builtin. (line 11)
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 325)
|
||||
(line 326)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 678)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 139)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 338)
|
||||
(line 339)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 438)
|
||||
(line 439)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 444)
|
||||
(line 445)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 510)
|
||||
(line 511)
|
||||
* type: Bash Builtins. (line 683)
|
||||
* typeset: Bash Builtins. (line 720)
|
||||
* ulimit: Bash Builtins. (line 726)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 515)
|
||||
(line 516)
|
||||
* unalias: Bash Builtins. (line 834)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 533)
|
||||
(line 534)
|
||||
* wait: Job Control Builtins.
|
||||
(line 86)
|
||||
|
||||
@@ -13094,51 +13098,51 @@ D.3 Parameter and Variable Index
|
||||
* HISTCONTROL: Bash Variables. (line 443)
|
||||
* HISTFILE: Bash Variables. (line 461)
|
||||
* HISTFILESIZE: Bash Variables. (line 467)
|
||||
* HISTIGNORE: Bash Variables. (line 478)
|
||||
* HISTIGNORE: Bash Variables. (line 481)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 234)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 240)
|
||||
* HISTSIZE: Bash Variables. (line 502)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 509)
|
||||
* HISTSIZE: Bash Variables. (line 505)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 512)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 250)
|
||||
* HOSTFILE: Bash Variables. (line 518)
|
||||
* HOSTNAME: Bash Variables. (line 529)
|
||||
* HOSTTYPE: Bash Variables. (line 532)
|
||||
* HOSTFILE: Bash Variables. (line 521)
|
||||
* HOSTNAME: Bash Variables. (line 532)
|
||||
* HOSTTYPE: Bash Variables. (line 535)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 535)
|
||||
* IGNOREEOF: Bash Variables. (line 538)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 258)
|
||||
* INPUTRC: Bash Variables. (line 544)
|
||||
* INSIDE_EMACS: Bash Variables. (line 548)
|
||||
* INPUTRC: Bash Variables. (line 547)
|
||||
* INSIDE_EMACS: Bash Variables. (line 551)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 269)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 276)
|
||||
* LANG: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LANG <1>: Bash Variables. (line 554)
|
||||
* LC_ALL: Bash Variables. (line 558)
|
||||
* LC_COLLATE: Bash Variables. (line 562)
|
||||
* LC_CTYPE: Bash Variables. (line 569)
|
||||
* LANG <1>: Bash Variables. (line 557)
|
||||
* LC_ALL: Bash Variables. (line 561)
|
||||
* LC_COLLATE: Bash Variables. (line 565)
|
||||
* LC_CTYPE: Bash Variables. (line 572)
|
||||
* LC_MESSAGES: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 574)
|
||||
* LC_NUMERIC: Bash Variables. (line 578)
|
||||
* LC_TIME: Bash Variables. (line 582)
|
||||
* LINENO: Bash Variables. (line 586)
|
||||
* LINES: Bash Variables. (line 593)
|
||||
* MACHTYPE: Bash Variables. (line 599)
|
||||
* LC_MESSAGES <1>: Bash Variables. (line 577)
|
||||
* LC_NUMERIC: Bash Variables. (line 581)
|
||||
* LC_TIME: Bash Variables. (line 585)
|
||||
* LINENO: Bash Variables. (line 589)
|
||||
* LINES: Bash Variables. (line 596)
|
||||
* MACHTYPE: Bash Variables. (line 602)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 24)
|
||||
* MAILCHECK: Bash Variables. (line 603)
|
||||
* MAILCHECK: Bash Variables. (line 606)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 29)
|
||||
* MAPFILE: Bash Variables. (line 611)
|
||||
* MAPFILE: Bash Variables. (line 614)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 306)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
@@ -13149,46 +13153,46 @@ D.3 Parameter and Variable Index
|
||||
(line 323)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 258)
|
||||
* OLDPWD: Bash Variables. (line 615)
|
||||
* OLDPWD: Bash Variables. (line 618)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 36)
|
||||
* OPTERR: Bash Variables. (line 618)
|
||||
* OPTERR: Bash Variables. (line 621)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 40)
|
||||
* OSTYPE: Bash Variables. (line 623)
|
||||
* OSTYPE: Bash Variables. (line 626)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 328)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 337)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 44)
|
||||
* PIPESTATUS: Bash Variables. (line 626)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 636)
|
||||
* PPID: Bash Variables. (line 646)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 650)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 656)
|
||||
* PS0: Bash Variables. (line 662)
|
||||
* PIPESTATUS: Bash Variables. (line 629)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 639)
|
||||
* PPID: Bash Variables. (line 649)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 653)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 659)
|
||||
* PS0: Bash Variables. (line 665)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 58)
|
||||
* PS3: Bash Variables. (line 667)
|
||||
* PS4: Bash Variables. (line 672)
|
||||
* PWD: Bash Variables. (line 680)
|
||||
* RANDOM: Bash Variables. (line 683)
|
||||
* READLINE_ARGUMENT: Bash Variables. (line 691)
|
||||
* READLINE_LINE: Bash Variables. (line 695)
|
||||
* READLINE_MARK: Bash Variables. (line 699)
|
||||
* READLINE_POINT: Bash Variables. (line 705)
|
||||
* REPLY: Bash Variables. (line 709)
|
||||
* PS3: Bash Variables. (line 670)
|
||||
* PS4: Bash Variables. (line 675)
|
||||
* PWD: Bash Variables. (line 683)
|
||||
* RANDOM: Bash Variables. (line 686)
|
||||
* READLINE_ARGUMENT: Bash Variables. (line 694)
|
||||
* READLINE_LINE: Bash Variables. (line 698)
|
||||
* READLINE_MARK: Bash Variables. (line 702)
|
||||
* READLINE_POINT: Bash Variables. (line 708)
|
||||
* REPLY: Bash Variables. (line 712)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 350)
|
||||
* search-ignore-case: Readline Init File Syntax.
|
||||
(line 357)
|
||||
* SECONDS: Bash Variables. (line 713)
|
||||
* SHELL: Bash Variables. (line 723)
|
||||
* SHELLOPTS: Bash Variables. (line 728)
|
||||
* SHLVL: Bash Variables. (line 738)
|
||||
* SECONDS: Bash Variables. (line 716)
|
||||
* SHELL: Bash Variables. (line 726)
|
||||
* SHELLOPTS: Bash Variables. (line 731)
|
||||
* SHLVL: Bash Variables. (line 741)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 362)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
@@ -13197,15 +13201,15 @@ D.3 Parameter and Variable Index
|
||||
(line 377)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 383)
|
||||
* SRANDOM: Bash Variables. (line 743)
|
||||
* SRANDOM: Bash Variables. (line 746)
|
||||
* TEXTDOMAIN: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* TEXTDOMAINDIR: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* TIMEFORMAT: Bash Variables. (line 752)
|
||||
* TMOUT: Bash Variables. (line 791)
|
||||
* TMPDIR: Bash Variables. (line 803)
|
||||
* UID: Bash Variables. (line 807)
|
||||
* TIMEFORMAT: Bash Variables. (line 755)
|
||||
* TMOUT: Bash Variables. (line 794)
|
||||
* TMPDIR: Bash Variables. (line 806)
|
||||
* UID: Bash Variables. (line 810)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 396)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
@@ -13600,138 +13604,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top904
|
||||
Node: Introduction2848
|
||||
Node: What is Bash?3064
|
||||
Node: What is a shell?4200
|
||||
Node: Definitions6813
|
||||
Node: Basic Shell Features10143
|
||||
Node: Shell Syntax11370
|
||||
Node: Shell Operation12400
|
||||
Node: Quoting13694
|
||||
Node: Escape Character15035
|
||||
Node: Single Quotes15573
|
||||
Node: Double Quotes15925
|
||||
Node: ANSI-C Quoting17273
|
||||
Node: Locale Translation18670
|
||||
Node: Creating Internationalized Scripts20076
|
||||
Node: Comments24277
|
||||
Node: Shell Commands25047
|
||||
Node: Reserved Words25989
|
||||
Node: Simple Commands26857
|
||||
Node: Pipelines27522
|
||||
Node: Lists30781
|
||||
Node: Compound Commands32656
|
||||
Node: Looping Constructs33668
|
||||
Node: Conditional Constructs36220
|
||||
Node: Command Grouping51293
|
||||
Node: Coprocesses52788
|
||||
Node: GNU Parallel55477
|
||||
Node: Shell Functions56398
|
||||
Node: Shell Parameters64849
|
||||
Node: Positional Parameters69753
|
||||
Node: Special Parameters70846
|
||||
Node: Shell Expansions74310
|
||||
Node: Brace Expansion76502
|
||||
Node: Tilde Expansion79841
|
||||
Node: Shell Parameter Expansion82799
|
||||
Node: Command Substitution103445
|
||||
Node: Arithmetic Expansion106977
|
||||
Node: Process Substitution108156
|
||||
Node: Word Splitting109267
|
||||
Node: Filename Expansion111714
|
||||
Node: Pattern Matching114941
|
||||
Node: Quote Removal120667
|
||||
Node: Redirections120974
|
||||
Node: Executing Commands131240
|
||||
Node: Simple Command Expansion131910
|
||||
Node: Command Search and Execution134021
|
||||
Node: Command Execution Environment136468
|
||||
Node: Environment139919
|
||||
Node: Exit Status141825
|
||||
Node: Signals143886
|
||||
Node: Shell Scripts148818
|
||||
Node: Shell Builtin Commands152119
|
||||
Node: Bourne Shell Builtins154233
|
||||
Node: Bash Builtins180806
|
||||
Node: Modifying Shell Behavior217733
|
||||
Node: The Set Builtin218078
|
||||
Node: The Shopt Builtin230075
|
||||
Node: Special Builtins247130
|
||||
Node: Shell Variables248122
|
||||
Node: Bourne Shell Variables248559
|
||||
Node: Bash Variables251070
|
||||
Node: Bash Features289978
|
||||
Node: Invoking Bash290995
|
||||
Node: Bash Startup Files297582
|
||||
Node: Interactive Shells302827
|
||||
Node: What is an Interactive Shell?303238
|
||||
Node: Is this Shell Interactive?303903
|
||||
Node: Interactive Shell Behavior304730
|
||||
Node: Bash Conditional Expressions308494
|
||||
Node: Shell Arithmetic313914
|
||||
Node: Aliases317246
|
||||
Node: Arrays320383
|
||||
Node: The Directory Stack327974
|
||||
Node: Directory Stack Builtins328774
|
||||
Node: Controlling the Prompt333222
|
||||
Node: The Restricted Shell336110
|
||||
Node: Bash POSIX Mode338995
|
||||
Node: Shell Compatibility Mode357355
|
||||
Node: Job Control366365
|
||||
Node: Job Control Basics366825
|
||||
Node: Job Control Builtins373196
|
||||
Node: Job Control Variables379881
|
||||
Node: Command Line Editing381115
|
||||
Node: Introduction and Notation382821
|
||||
Node: Readline Interaction385176
|
||||
Node: Readline Bare Essentials386367
|
||||
Node: Readline Movement Commands388178
|
||||
Node: Readline Killing Commands389177
|
||||
Node: Readline Arguments391203
|
||||
Node: Searching392263
|
||||
Node: Readline Init File394509
|
||||
Node: Readline Init File Syntax395815
|
||||
Node: Conditional Init Constructs422643
|
||||
Node: Sample Init File427031
|
||||
Node: Bindable Readline Commands430154
|
||||
Node: Commands For Moving431695
|
||||
Node: Commands For History434162
|
||||
Node: Commands For Text439555
|
||||
Node: Commands For Killing443683
|
||||
Node: Numeric Arguments446474
|
||||
Node: Commands For Completion447629
|
||||
Node: Keyboard Macros453328
|
||||
Node: Miscellaneous Commands454032
|
||||
Node: Readline vi Mode460602
|
||||
Node: Programmable Completion461582
|
||||
Node: Programmable Completion Builtins470322
|
||||
Node: A Programmable Completion Example482062
|
||||
Node: Using History Interactively487410
|
||||
Node: Bash History Facilities488094
|
||||
Node: Bash History Builtins491832
|
||||
Node: History Interaction498306
|
||||
Node: Event Designators503259
|
||||
Node: Word Designators504840
|
||||
Node: Modifiers507235
|
||||
Node: Installing Bash509175
|
||||
Node: Basic Installation510294
|
||||
Node: Compilers and Options514173
|
||||
Node: Compiling For Multiple Architectures514926
|
||||
Node: Installation Names516682
|
||||
Node: Specifying the System Type518919
|
||||
Node: Sharing Defaults519668
|
||||
Node: Operation Controls520385
|
||||
Node: Optional Features521407
|
||||
Node: Reporting Bugs533790
|
||||
Node: Major Differences From The Bourne Shell535150
|
||||
Node: GNU Free Documentation License556579
|
||||
Node: Indexes581759
|
||||
Node: Builtin Index582213
|
||||
Node: Reserved Word Index589314
|
||||
Node: Variable Index591762
|
||||
Node: Function Index609178
|
||||
Node: Concept Index623176
|
||||
Node: Top896
|
||||
Node: Introduction2832
|
||||
Node: What is Bash?3048
|
||||
Node: What is a shell?4184
|
||||
Node: Definitions6797
|
||||
Node: Basic Shell Features10127
|
||||
Node: Shell Syntax11354
|
||||
Node: Shell Operation12384
|
||||
Node: Quoting13678
|
||||
Node: Escape Character15019
|
||||
Node: Single Quotes15557
|
||||
Node: Double Quotes15909
|
||||
Node: ANSI-C Quoting17257
|
||||
Node: Locale Translation18654
|
||||
Node: Creating Internationalized Scripts20060
|
||||
Node: Comments24261
|
||||
Node: Shell Commands25031
|
||||
Node: Reserved Words25973
|
||||
Node: Simple Commands26841
|
||||
Node: Pipelines27506
|
||||
Node: Lists30765
|
||||
Node: Compound Commands32640
|
||||
Node: Looping Constructs33652
|
||||
Node: Conditional Constructs36204
|
||||
Node: Command Grouping51277
|
||||
Node: Coprocesses52772
|
||||
Node: GNU Parallel55461
|
||||
Node: Shell Functions56382
|
||||
Node: Shell Parameters64833
|
||||
Node: Positional Parameters69737
|
||||
Node: Special Parameters70830
|
||||
Node: Shell Expansions74294
|
||||
Node: Brace Expansion76486
|
||||
Node: Tilde Expansion79825
|
||||
Node: Shell Parameter Expansion82783
|
||||
Node: Command Substitution103429
|
||||
Node: Arithmetic Expansion106961
|
||||
Node: Process Substitution108140
|
||||
Node: Word Splitting109251
|
||||
Node: Filename Expansion111698
|
||||
Node: Pattern Matching114925
|
||||
Node: Quote Removal120651
|
||||
Node: Redirections120958
|
||||
Node: Executing Commands131224
|
||||
Node: Simple Command Expansion131894
|
||||
Node: Command Search and Execution134005
|
||||
Node: Command Execution Environment136452
|
||||
Node: Environment139903
|
||||
Node: Exit Status141809
|
||||
Node: Signals143870
|
||||
Node: Shell Scripts148802
|
||||
Node: Shell Builtin Commands152103
|
||||
Node: Bourne Shell Builtins154217
|
||||
Node: Bash Builtins180867
|
||||
Node: Modifying Shell Behavior217794
|
||||
Node: The Set Builtin218139
|
||||
Node: The Shopt Builtin230136
|
||||
Node: Special Builtins247191
|
||||
Node: Shell Variables248183
|
||||
Node: Bourne Shell Variables248620
|
||||
Node: Bash Variables251131
|
||||
Node: Bash Features290258
|
||||
Node: Invoking Bash291275
|
||||
Node: Bash Startup Files297862
|
||||
Node: Interactive Shells303107
|
||||
Node: What is an Interactive Shell?303518
|
||||
Node: Is this Shell Interactive?304183
|
||||
Node: Interactive Shell Behavior305010
|
||||
Node: Bash Conditional Expressions308774
|
||||
Node: Shell Arithmetic314194
|
||||
Node: Aliases317526
|
||||
Node: Arrays320663
|
||||
Node: The Directory Stack328254
|
||||
Node: Directory Stack Builtins329054
|
||||
Node: Controlling the Prompt333502
|
||||
Node: The Restricted Shell336390
|
||||
Node: Bash POSIX Mode339275
|
||||
Node: Shell Compatibility Mode357635
|
||||
Node: Job Control366645
|
||||
Node: Job Control Basics367105
|
||||
Node: Job Control Builtins373476
|
||||
Node: Job Control Variables380161
|
||||
Node: Command Line Editing381395
|
||||
Node: Introduction and Notation383101
|
||||
Node: Readline Interaction385456
|
||||
Node: Readline Bare Essentials386647
|
||||
Node: Readline Movement Commands388458
|
||||
Node: Readline Killing Commands389457
|
||||
Node: Readline Arguments391483
|
||||
Node: Searching392543
|
||||
Node: Readline Init File394789
|
||||
Node: Readline Init File Syntax396095
|
||||
Node: Conditional Init Constructs422923
|
||||
Node: Sample Init File427311
|
||||
Node: Bindable Readline Commands430434
|
||||
Node: Commands For Moving431975
|
||||
Node: Commands For History434442
|
||||
Node: Commands For Text439835
|
||||
Node: Commands For Killing443963
|
||||
Node: Numeric Arguments446754
|
||||
Node: Commands For Completion447909
|
||||
Node: Keyboard Macros453608
|
||||
Node: Miscellaneous Commands454312
|
||||
Node: Readline vi Mode460882
|
||||
Node: Programmable Completion461862
|
||||
Node: Programmable Completion Builtins470602
|
||||
Node: A Programmable Completion Example482342
|
||||
Node: Using History Interactively487690
|
||||
Node: Bash History Facilities488374
|
||||
Node: Bash History Builtins492112
|
||||
Node: History Interaction498586
|
||||
Node: Event Designators503539
|
||||
Node: Word Designators505120
|
||||
Node: Modifiers507515
|
||||
Node: Installing Bash509455
|
||||
Node: Basic Installation510574
|
||||
Node: Compilers and Options514453
|
||||
Node: Compiling For Multiple Architectures515206
|
||||
Node: Installation Names516962
|
||||
Node: Specifying the System Type519199
|
||||
Node: Sharing Defaults519948
|
||||
Node: Operation Controls520665
|
||||
Node: Optional Features521687
|
||||
Node: Reporting Bugs534070
|
||||
Node: Major Differences From The Bourne Shell535430
|
||||
Node: GNU Free Documentation License556859
|
||||
Node: Indexes582039
|
||||
Node: Builtin Index582493
|
||||
Node: Reserved Word Index589594
|
||||
Node: Variable Index592042
|
||||
Node: Function Index609458
|
||||
Node: Concept Index623456
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+32
-7
@@ -4370,9 +4370,11 @@ refer to shell functions; otherwise the names refer to shell variables.
|
||||
|
||||
The @option{-n} option means to unexport each name: no longer mark
|
||||
it for export.
|
||||
If no @var{name}s are supplied, or if the @option{-p} option is given,
|
||||
@code{export} displays a list of names of all exported variables on the
|
||||
standard output.
|
||||
If no @var{name}s are supplied, or if only
|
||||
the @option{-p} option is given,
|
||||
@code{export} displays a list of names of all exported
|
||||
variables on the standard output.
|
||||
Using @option{-p} and @option{-f} together displays exported functions.
|
||||
The @option{-p} option displays output in a form that may be reused as input.
|
||||
|
||||
@code{export} allows the value of a variable to be set at the same time
|
||||
@@ -7301,8 +7303,13 @@ the shell does not save the command history when it exits.
|
||||
@item HISTFILESIZE
|
||||
The maximum number of lines contained in the history file.
|
||||
When this variable is assigned a value, the history file is truncated,
|
||||
if necessary, to contain no more than that number of lines
|
||||
if necessary, to contain no more than
|
||||
the number of history entries
|
||||
that total no more than that number of lines
|
||||
by removing the oldest entries.
|
||||
If the history list contains multi-line entries,
|
||||
the history file may contain more lines than this maximum
|
||||
to avoid leaving partial history entries.
|
||||
The history file is also truncated to this size after
|
||||
writing it when a shell exits or by the @code{history} builtin.
|
||||
If the value is 0, the history file is truncated to zero size.
|
||||
@@ -8589,7 +8596,8 @@ not when the function is executed, because a function definition
|
||||
is itself a command.
|
||||
As a consequence, aliases
|
||||
defined in a function are not available until after that
|
||||
function is executed. To be safe, always put
|
||||
function is executed.
|
||||
To be safe, always put
|
||||
alias definitions on a separate line, and do not use @code{alias}
|
||||
in compound commands.
|
||||
|
||||
@@ -8902,8 +8910,8 @@ If the @code{popd} command is successful,
|
||||
Bash runs @code{dirs} to show the final contents of the directory stack,
|
||||
and the return status is 0.
|
||||
|
||||
@btindex pushd
|
||||
@item pushd
|
||||
@btindex pushd
|
||||
@example
|
||||
pushd [-n] [@var{+N} | @var{-N} | @var{dir}]
|
||||
@end example
|
||||
@@ -9579,12 +9587,23 @@ statuses after the @code{wait} builtin returns it.
|
||||
|
||||
@end enumerate
|
||||
|
||||
There is other @sc{posix} behavior that Bash does not implement by
|
||||
There is additional @sc{posix} behavior that Bash does not implement by
|
||||
default even when in @sc{posix} mode.
|
||||
Specifically:
|
||||
|
||||
@enumerate
|
||||
|
||||
@item
|
||||
@sc{posix} requires that word splitting be byte-oriented.
|
||||
That is, each @emph{byte} in the value of @env{IFS} potentially splits a
|
||||
word, even if that byte is part of a multibyte character in @env{IFS}
|
||||
or part of multibyte character in the word.
|
||||
Bash allows multibyte characters in the value of @env{IFS}, treating
|
||||
a valid multibyte character as a single delimiter, and will not
|
||||
split a valid multibyte character even if one of the bytes composing that
|
||||
character appears in @env{IFS}.
|
||||
This is @sc{posix} interpretation 1560, further modified by issue 1924.
|
||||
|
||||
@item
|
||||
The @code{fc} builtin checks @code{$EDITOR} as a program to edit history
|
||||
entries if @code{FCEDIT} is unset, rather than defaulting directly to
|
||||
@@ -9829,6 +9848,12 @@ the arguments as key sequences to bind.
|
||||
Interactive shells will notify the user of completed jobs while sourcing a
|
||||
script.
|
||||
Newer versions defer notification until script execution completes.
|
||||
@ignore
|
||||
@item
|
||||
Bash will not try to execute a shell function whose name contains a slash.
|
||||
Previous versions disallowed this in @sc{posix} mode but allowed it by
|
||||
default.
|
||||
@end ignore
|
||||
@end itemize
|
||||
|
||||
@end table
|
||||
|
||||
+735
-733
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2025 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Mon Feb 24 16:09:32 EST 2025
|
||||
@set LASTCHANGE Sun May 18 13:42:18 EDT 2025
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 24 February 2025
|
||||
@set UPDATED-MONTH February 2025
|
||||
@set UPDATED 18 May 2025
|
||||
@set UPDATED-MONTH May 2025
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
# The first cut of this was by Bill Trost, trost@reed.bitnet.
|
||||
# The second cut came from Chet Ramey, chet@ins.CWRU.Edu
|
||||
# The third cut came from Mark Kennedy, mtk@ny.ubs.com. 1998/08/25
|
||||
# The third cut came from Mark Kennedy, now mtk@acm.org. 1998/08/25
|
||||
|
||||
unset _AUTOLOADS
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# The first cut of this was by Bill Trost, trost@reed.bitnet.
|
||||
# The second cut came from Chet Ramey, chet@ins.CWRU.Edu
|
||||
# The third cut came from Mark Kennedy, mtk@ny.ubs.com. 1998/08/25
|
||||
# The third cut came from Mark Kennedy, now mtk@acm.org. 1998/08/25
|
||||
# The fourth cut came from Matthew Persico, matthew.persico@gmail.com 2017/August
|
||||
|
||||
autoload_calc_shimsize ()
|
||||
|
||||
@@ -103,8 +103,8 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \
|
||||
ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \
|
||||
tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \
|
||||
uname sync push ln unlink realpath strftime mypid setpgid seq rm \
|
||||
accept csv dsv cut stat getconf kv strptime chmod
|
||||
OTHERPROG = necho hello cat pushd asort fltexpr
|
||||
accept csv dsv cut stat getconf kv strptime chmod fltexpr
|
||||
OTHERPROG = necho hello cat pushd asort
|
||||
|
||||
SUBDIRS = perl
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ typedef double sh_float_t;
|
||||
#define PREDEC 15 /* --var */
|
||||
#define POSTINC 16 /* var++ */
|
||||
#define POSTDEC 17 /* var-- */
|
||||
#define FUNC 18 /* function call */
|
||||
#define EQ '='
|
||||
#define GT '>'
|
||||
#define LT '<'
|
||||
@@ -148,6 +149,10 @@ typedef double sh_float_t;
|
||||
#define SHFLOAT_LENGTH_MODIFIER 'l';
|
||||
#define SHFLOAT_STRTOD strtod
|
||||
|
||||
#ifndef M_EGAMMA
|
||||
#define M_EGAMMA 0.57721566490153286060651209008240243
|
||||
#endif
|
||||
|
||||
struct lvalue
|
||||
{
|
||||
char *tokstr; /* possibly-rewritten lvalue if not NULL */
|
||||
@@ -184,6 +189,150 @@ static int already_expanded;
|
||||
static struct lvalue curlval = {0, 0, 0, -1};
|
||||
static struct lvalue lastlval = {0, 0, 0, -1};
|
||||
|
||||
/* Function equivalents for POSIX math.h macros. */
|
||||
static int xfpclassify(sh_float_t d) { return fpclassify(d); }
|
||||
static int xisinf(sh_float_t d) { return isinf(d); }
|
||||
static int xisnan(sh_float_t d) { return isnan(d); }
|
||||
static int xisnormal(sh_float_t d) { return isnormal(d); }
|
||||
static int xisfinite(sh_float_t d) { return isfinite(d); }
|
||||
static int xsignbit(sh_float_t d) { return signbit(d); }
|
||||
|
||||
static int xisgreater(sh_float_t d1, sh_float_t d2) { return isgreater(d1, d2); }
|
||||
static int xisgreaterequal(sh_float_t d1, sh_float_t d2) { return isgreaterequal(d1, d2); }
|
||||
static int xisless(sh_float_t d1, sh_float_t d2) { return isless(d1, d2); }
|
||||
static int xislessequal(sh_float_t d1, sh_float_t d2) { return islessequal(d1, d2); }
|
||||
static int xislessgreater(sh_float_t d1, sh_float_t d2) { return islessgreater(d1, d2); }
|
||||
static int xisunordered(sh_float_t d1, sh_float_t d2) { return isunordered(d1, d2); }
|
||||
|
||||
static int xisinfinite(sh_float_t d) { return (fpclassify(d) == FP_INFINITE); }
|
||||
static int xissubnormal(sh_float_t d) { return (fpclassify(d) == FP_SUBNORMAL); }
|
||||
static int xiszero(sh_float_t d) { return (fpclassify(d) == FP_ZERO); }
|
||||
|
||||
/* Function replacements for some math functions that don't conform to the
|
||||
supported prototypes. */
|
||||
static sh_float_t xscalbn(sh_float_t d1, sh_float_t d2) { int x = d2; return (scalbn (d1, x)); }
|
||||
static sh_float_t xjn(sh_float_t d1, sh_float_t d2) { int x = d1; return (jn (x, d2)); }
|
||||
static sh_float_t xyn(sh_float_t d1, sh_float_t d2) { int x = d1; return (yn (x, d2)); }
|
||||
static sh_float_t xldexp(sh_float_t d1, sh_float_t d2) { int x = d2; return (ldexp (d1, x)); }
|
||||
|
||||
/* Some additional math functions that aren't in libm */
|
||||
static sh_float_t xcot(sh_float_t d) { return (1.0 / tan(d)); }
|
||||
static sh_float_t xcoth(sh_float_t d) { return (cosh(d) / sinh(d)); }
|
||||
|
||||
static sh_float_t xroundp(sh_float_t d1, sh_float_t d2)
|
||||
{
|
||||
sh_float_t m, r;
|
||||
int prec = d2;
|
||||
|
||||
m = pow(10.0, prec);
|
||||
r = round(d1 * m) / m;
|
||||
return r;
|
||||
}
|
||||
|
||||
typedef int imathfunc1(sh_float_t);
|
||||
typedef int imathfunc2(sh_float_t, sh_float_t);
|
||||
typedef sh_float_t mathfunc1(sh_float_t);
|
||||
typedef sh_float_t mathfunc2(sh_float_t, sh_float_t);
|
||||
typedef sh_float_t mathfunc3(sh_float_t, sh_float_t, sh_float_t);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
int nargs; /* > 0, function returns double; < 0, function returns int */
|
||||
union
|
||||
{
|
||||
mathfunc1 *func1;
|
||||
mathfunc2 *func2;
|
||||
mathfunc3 *func3;
|
||||
imathfunc1 *ifunc1;
|
||||
imathfunc2 *ifunc2;
|
||||
} f;
|
||||
} FLTEXPR_MATHFUN;
|
||||
|
||||
/* Not implemented yet: functions that don't fit one of the supported
|
||||
calling prototypes, with a couple of exceptions */
|
||||
FLTEXPR_MATHFUN mathfuncs[] =
|
||||
{
|
||||
{ "abs", 1, { .func1 = fabs } },
|
||||
{ "acos", 1, { .func1 = acos } },
|
||||
{ "acosh", 1, { .func1 = acosh } },
|
||||
{ "asin", 1, { .func1 = asin } },
|
||||
{ "asinh", 1, { .func1 = asinh } },
|
||||
{ "atan", 1, { .func1 = atan } },
|
||||
{ "atanh", 1, { .func1 = atanh } },
|
||||
{ "cbrt", 1, { .func1 = cbrt } },
|
||||
{ "ceil", 1, { .func1 = ceil } },
|
||||
{ "cos", 1, { .func1 = cos } },
|
||||
{ "cosh", 1, { .func1 = cosh } },
|
||||
{ "cot", 1, { .func1 = xcot } },
|
||||
{ "coth", 1, { .func1 = xcoth } },
|
||||
{ "erf", 1, { .func1 = erf } },
|
||||
{ "erfc", 1, { .func1 = erfc } },
|
||||
{ "exp", 1, { .func1 = exp } },
|
||||
{ "exp2", 1, { .func1 = exp2 } },
|
||||
{ "expm1", 1, { .func1 = expm1 } },
|
||||
{ "fabs", 1, { .func1 = fabs } },
|
||||
{ "floor", 1, { .func1 = floor } },
|
||||
{ "j0", 1, { .func1 = j0 } },
|
||||
{ "j1", 1, { .func1 = j1 } },
|
||||
{ "lgamma", 1, { .func1 = lgamma } },
|
||||
{ "log", 1, { .func1 = log } },
|
||||
{ "log10", 1, { .func1 = log10 } },
|
||||
{ "log1p", 1, { .func1 = log1p } },
|
||||
{ "log2", 1, { .func1 = log2 } },
|
||||
{ "logb", 1, { .func1 = logb } },
|
||||
{ "nearbyint",1, { .func1 = nearbyint } },
|
||||
{ "rint", 1, { .func1 = rint } },
|
||||
{ "round", 1, { .func1 = round } },
|
||||
{ "sin", 1, { .func1 = sin } },
|
||||
{ "sinh", 1, { .func1 = sinh } },
|
||||
{ "sqrt", 1, { .func1 = sqrt } },
|
||||
{ "tan", 1, { .func1 = tan } },
|
||||
{ "tanh", 1, { .func1 = tanh } },
|
||||
{ "tgamma", 1, { .func1 = tgamma } },
|
||||
{ "trunc", 1, { .func1 = trunc } },
|
||||
{ "y0", 1, { .func1 = y0 } },
|
||||
{ "y1", 1, { .func1 = y1 } },
|
||||
|
||||
{ "atan2", 2, { .func2 = atan2 } },
|
||||
{ "copysign", 2, { .func2 = copysign } },
|
||||
{ "fdim", 2, { .func2 = fdim } },
|
||||
{ "fmax", 2, { .func2 = fmax } },
|
||||
{ "fmin", 2, { .func2 = fmin } },
|
||||
{ "fmod", 2, { .func2 = fmod } },
|
||||
{ "hypot", 2, { .func2 = hypot } },
|
||||
{ "nextafter",2, { .func2 = nextafter } },
|
||||
{ "pow", 2, { .func2 = pow } },
|
||||
{ "remainder",2, { .func2 = remainder } },
|
||||
{ "roundp", 2, { .func2 = xroundp } },
|
||||
{ "ldexp", 2, { .func2 = xldexp } },
|
||||
{ "jn", 2, { .func2 = xjn } },
|
||||
{ "scalbn", 2, { .func2 = xscalbn } },
|
||||
{ "yn", 2, { .func2 = xyn } },
|
||||
|
||||
{ "fma", 3, { .func3 = fma } },
|
||||
|
||||
{ "fpclassify",-1, { .ifunc1 = xfpclassify } },
|
||||
{ "isfinite", -1, { .ifunc1 = xisfinite } },
|
||||
{ "isinf", -1, { .ifunc1 = xisinf } },
|
||||
{ "isinfinite",-1, { .ifunc1 = xisinfinite } },
|
||||
{ "isnan", -1, { .ifunc1 = xisnan } },
|
||||
{ "isnormal", -1, { .ifunc1 = xisnormal } },
|
||||
{ "issubnormal",-1, { .ifunc1 = xissubnormal } },
|
||||
{ "iszero", -1, { .ifunc1 = xiszero } },
|
||||
{ "ilogb", -1, { .ifunc1 = ilogb } },
|
||||
{ "signbit", -1, { .ifunc1 = xsignbit } },
|
||||
|
||||
{ "isgreater",-2, { .ifunc2 = xisgreater } },
|
||||
{ "isgreaterequal",-2,{ .ifunc2 = xisgreaterequal } },
|
||||
{ "isless", -2, { .ifunc2 = xisless } },
|
||||
{ "islessequal", -2, { .ifunc2 = xislessequal } },
|
||||
{ "islessgreater",-2, { .ifunc2 = xislessgreater } },
|
||||
{ "isunordered",-2, { .ifunc2 = xisunordered } },
|
||||
|
||||
{ NULL, 0, NULL }
|
||||
};
|
||||
|
||||
static sh_float_t nanval, infval;
|
||||
|
||||
static int is_arithop (int);
|
||||
@@ -194,10 +343,15 @@ static void init_lvalue (struct lvalue *);
|
||||
static struct lvalue *alloc_lvalue (void);
|
||||
static void free_lvalue (struct lvalue *);
|
||||
|
||||
static sh_float_t fltexpr_streval (char *, int, struct lvalue *);
|
||||
static sh_float_t fltexpr_streval (char *, int, struct lvalue *);
|
||||
|
||||
static int fltexpr_findfunc (char *);
|
||||
static sh_float_t fltexpr_funeval (char *, struct lvalue *);
|
||||
static sh_float_t expfunc (int);
|
||||
|
||||
static void evalerror (const char *);
|
||||
|
||||
static sh_float_t fltexpr_strtod (const char *, char **);
|
||||
static sh_float_t fltexpr_strtod (const char *, char **);
|
||||
static char *fltexpr_format (sh_float_t);
|
||||
|
||||
#if defined (ARRAYS)
|
||||
@@ -368,7 +522,7 @@ fltexpr_format (sh_float_t val)
|
||||
*p++ = '.';
|
||||
*p++ = '*';
|
||||
*p++ = SHFLOAT_LENGTH_MODIFIER;
|
||||
*p++ = 'g'; /* XXX */
|
||||
*p++ = 'g';
|
||||
*p = '\0';
|
||||
|
||||
retsize = sizeof (ret);
|
||||
@@ -1019,12 +1173,74 @@ exp0 (void)
|
||||
|
||||
readtok ();
|
||||
}
|
||||
else if (curtok == FUNC)
|
||||
{
|
||||
val = expfunc (tokval);
|
||||
lasttok = FUNC;
|
||||
curtok = NUM;
|
||||
|
||||
readtok (); /* skip over closing right paren, expfunc checks syntax */
|
||||
}
|
||||
else
|
||||
evalerror (_("arithmetic syntax error: operand expected"));
|
||||
|
||||
return (val);
|
||||
}
|
||||
|
||||
/* Evaluate a math function call with some minimal error checking. */
|
||||
static sh_float_t
|
||||
expfunc (int ind)
|
||||
{
|
||||
FLTEXPR_MATHFUN func;
|
||||
sh_float_t arg1, arg2, arg3, val;
|
||||
int nargs, ival;
|
||||
|
||||
func = mathfuncs[ind];
|
||||
/* If func.nargs > 0, the function returns double and takes func.nargs arguments;
|
||||
if func.nargs < 0, the function returns int and takes -func.nargs arguments. */
|
||||
nargs = (func.nargs > 0) ? func.nargs : -func.nargs;
|
||||
|
||||
readtok();
|
||||
if (curtok != LPAR)
|
||||
evalerror (_("function call: expected left paren"));
|
||||
|
||||
readtok ();
|
||||
arg1 = expassign ();
|
||||
if (nargs > 1)
|
||||
{
|
||||
if (curtok != COMMA)
|
||||
evalerror (_("function call: expected comma"));
|
||||
readtok (); /* consume the comma */
|
||||
arg2 = expassign ();
|
||||
}
|
||||
if (nargs > 2)
|
||||
{
|
||||
if (curtok != COMMA)
|
||||
evalerror (_("function call: expected comma"));
|
||||
readtok (); /* consume the comma */
|
||||
arg3 = expassign ();
|
||||
}
|
||||
|
||||
if (curtok != RPAR)
|
||||
evalerror (_("function call: expected right paren"));
|
||||
|
||||
switch (func.nargs)
|
||||
{
|
||||
case 1:
|
||||
val = (*func.f.func1) (arg1); break;
|
||||
case 2:
|
||||
val = (*func.f.func2) (arg1, arg2); break;
|
||||
case 3:
|
||||
val = (*func.f.func3) (arg1, arg2, arg3); break;
|
||||
case -1:
|
||||
ival = (*func.f.ifunc1) (arg1); val = ival; break;
|
||||
case -2:
|
||||
ival = (*func.f.ifunc2) (arg1, arg2); val = ival; break;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static void
|
||||
init_lvalue (struct lvalue *lv)
|
||||
{
|
||||
@@ -1050,6 +1266,17 @@ free_lvalue (struct lvalue *lv)
|
||||
free (lv); /* should be inlined */
|
||||
}
|
||||
|
||||
static int
|
||||
fltexpr_findfunc (char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; mathfuncs[i].name; i++)
|
||||
if (STREQ (name, mathfuncs[i].name))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static sh_float_t
|
||||
fltexpr_streval (char *tok, int e, struct lvalue *lvalue)
|
||||
{
|
||||
@@ -1263,12 +1490,33 @@ readtok (void)
|
||||
lasttok = curtok;
|
||||
curtok = NUM;
|
||||
}
|
||||
else if (strncasecmp (tp, "PI", 2) == 0 && (isalnum (tp[2]) == 0))
|
||||
{
|
||||
cp = tp + 2;
|
||||
tokval = M_PI;
|
||||
lasttok = curtok;
|
||||
curtok = NUM;
|
||||
}
|
||||
else if (strncasecmp (tp, "GAMMA", 2) == 0 && (isalnum (tp[5]) == 0))
|
||||
{
|
||||
cp = tp + 5;
|
||||
tokval = M_EGAMMA;
|
||||
lasttok = curtok;
|
||||
curtok = NUM;
|
||||
}
|
||||
else if ((tp[0] == 'E' || tp[0] == 'e') && (isalnum (tp[1]) == 0))
|
||||
{
|
||||
cp = tp + 1;
|
||||
tokval = M_E;
|
||||
lasttok = curtok;
|
||||
curtok = NUM;
|
||||
}
|
||||
else if (legal_variable_starter (c))
|
||||
{
|
||||
/* variable names not preceded with a dollar sign are shell variables. */
|
||||
char *savecp;
|
||||
FLTEXPR_CONTEXT ec;
|
||||
int peektok;
|
||||
int peektok, ind;
|
||||
|
||||
while (legal_variable_char (c))
|
||||
c = *cp++;
|
||||
@@ -1312,6 +1560,18 @@ readtok (void)
|
||||
RESTORETOK (&ec);
|
||||
cp = savecp;
|
||||
|
||||
ind = -1;
|
||||
if ((ind = fltexpr_findfunc (tokstr)) != -1 && peektok == LPAR)
|
||||
{
|
||||
lasttok = curtok;
|
||||
curtok = FUNC;
|
||||
tokval = ind; /* overload this here for expfunc */
|
||||
tp = cp;
|
||||
return; /* XXX */
|
||||
}
|
||||
else if (ind == -1 && peektok == LPAR)
|
||||
evalerror (_("unrecognized function name"));
|
||||
|
||||
/* The tests for PREINC and PREDEC aren't strictly correct, but they
|
||||
preserve old behavior if a construct like --x=9 is given. */
|
||||
if (lasttok == PREINC || lasttok == PREDEC || peektok != EQ)
|
||||
|
||||
@@ -4669,7 +4669,11 @@ execute_simple_command (SIMPLE_COM *simple_command, int pipe_in, int pipe_out, i
|
||||
builtin_is_special = 1;
|
||||
}
|
||||
if (builtin == 0)
|
||||
#if 0 /*TAG bash-5.4 rob@landley.net 5/1/2025 */
|
||||
func = ((shell_compatibility_level <= 52 && posixly_correct == 0) || absolute_program (words->word->word) == 0) ? find_function (words->word->word) : 0;
|
||||
#else
|
||||
func = (posixly_correct == 0 || absolute_program (words->word->word) == 0) ? find_function (words->word->word) : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* What happens in posix mode when an assignment preceding a command name
|
||||
|
||||
@@ -809,7 +809,7 @@ rl_redisplay (void)
|
||||
{
|
||||
int in, out, c, linenum, cursor_linenum;
|
||||
int inv_botlin, lb_botlin, lb_linenum, o_cpos;
|
||||
int newlines, lpos, temp, num, prompt_lines_estimate;
|
||||
int newlines, lpos, temp, num;
|
||||
char *prompt_this_line;
|
||||
char cur_face;
|
||||
int hl_begin, hl_end;
|
||||
@@ -1014,9 +1014,6 @@ rl_redisplay (void)
|
||||
on the first and last prompt lines; change that to use
|
||||
local_prompt_invis_chars */
|
||||
|
||||
/* This is zero-based, used to set the newlines */
|
||||
prompt_lines_estimate = lpos / _rl_screenwidth;
|
||||
|
||||
/* what if lpos is already >= _rl_screenwidth before we start drawing the
|
||||
contents of the command line? */
|
||||
if (lpos >= _rl_screenwidth)
|
||||
@@ -1908,7 +1905,6 @@ update_line (char *old, char *old_face, char *new, char *new_face, int current_l
|
||||
if (newwidth > 0)
|
||||
{
|
||||
int i, j;
|
||||
char *optr;
|
||||
|
||||
puts_face (new, new_face, newbytes);
|
||||
_rl_last_c_pos = newwidth;
|
||||
|
||||
@@ -79,9 +79,11 @@ main (int c, char **v)
|
||||
/* Set the default locale values according to environment variables. */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
#if defined (SIGWINCH)
|
||||
/* Handle window size changes when readline is not active and reading
|
||||
characters. */
|
||||
signal (SIGWINCH, sighandler);
|
||||
#endif
|
||||
|
||||
/* Install the line handler. */
|
||||
rl_callback_handler_install (prompt, cb_linehandler);
|
||||
|
||||
@@ -679,7 +679,7 @@ history_expand_internal (const char *string, int start, int qc, int *end_index_p
|
||||
case 's':
|
||||
{
|
||||
char *new_event;
|
||||
int delimiter, failed, si, l_temp, ws, we;
|
||||
int delimiter, failed, si, l_temp, we;
|
||||
|
||||
if (c == 's')
|
||||
{
|
||||
@@ -778,7 +778,6 @@ history_expand_internal (const char *string, int start, int qc, int *end_index_p
|
||||
{
|
||||
for (; temp[si] && fielddelim (temp[si]); si++)
|
||||
;
|
||||
ws = si;
|
||||
we = history_tokenize_word (temp, si);
|
||||
}
|
||||
|
||||
|
||||
+22
-3
@@ -182,6 +182,7 @@ history_filename (const char *filename)
|
||||
return (return_val);
|
||||
}
|
||||
|
||||
#if defined (DEBUG)
|
||||
static char *
|
||||
history_backupfile (const char *filename)
|
||||
{
|
||||
@@ -208,6 +209,7 @@ history_backupfile (const char *filename)
|
||||
ret[len+1] = '\0';
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static char *
|
||||
history_tempfile (const char *filename)
|
||||
@@ -267,6 +269,7 @@ read_history_range (const char *filename, int from, int to)
|
||||
register char *line_start, *line_end, *p;
|
||||
char *input, *buffer, *bufend, *last_ts;
|
||||
int file, current_line, chars_read, has_timestamps, reset_comment_char;
|
||||
int skipblanks, default_skipblanks;
|
||||
struct stat finfo;
|
||||
size_t file_size;
|
||||
#if defined (EFBIG)
|
||||
@@ -380,6 +383,9 @@ read_history_range (const char *filename, int from, int to)
|
||||
has_timestamps = HIST_TIMESTAMP_START (buffer);
|
||||
history_multiline_entries += has_timestamps && history_write_timestamps;
|
||||
|
||||
/* default is to skip blank lines unless history entries are multiline */
|
||||
default_skipblanks = history_multiline_entries == 0;
|
||||
|
||||
/* Skip lines until we are at FROM. */
|
||||
if (has_timestamps)
|
||||
last_ts = buffer;
|
||||
@@ -405,6 +411,8 @@ read_history_range (const char *filename, int from, int to)
|
||||
}
|
||||
}
|
||||
|
||||
skipblanks = default_skipblanks;
|
||||
|
||||
/* If there are lines left to gobble, then gobble them now. */
|
||||
for (line_end = line_start; line_end < bufend; line_end++)
|
||||
if (*line_end == '\n')
|
||||
@@ -415,10 +423,16 @@ read_history_range (const char *filename, int from, int to)
|
||||
else
|
||||
*line_end = '\0';
|
||||
|
||||
if (*line_start)
|
||||
if (*line_start || skipblanks == 0)
|
||||
{
|
||||
if (HIST_TIMESTAMP_START(line_start) == 0)
|
||||
{
|
||||
/* If we have multiline entries (default_skipblanks == 0), we
|
||||
don't want to skip blanks here, since we turned that on at
|
||||
the last timestamp line. Consider doing this even if
|
||||
default_skipblanks == 1 in order not to lose blank lines in
|
||||
commands. */
|
||||
skipblanks = default_skipblanks;
|
||||
if (last_ts == NULL && history_length > 0 && history_multiline_entries)
|
||||
_hs_append_history_line (history_length - 1, line_start);
|
||||
else
|
||||
@@ -433,6 +447,9 @@ read_history_range (const char *filename, int from, int to)
|
||||
{
|
||||
last_ts = line_start;
|
||||
current_line--;
|
||||
/* Even if we're not skipping blank lines by default, we want
|
||||
to skip leading blank lines after a timestamp. */
|
||||
skipblanks = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,6 +487,7 @@ history_rename (const char *old, const char *new)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (DEBUG)
|
||||
/* Save FILENAME to BACK, handling case where FILENAME is a symlink
|
||||
(e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */
|
||||
static int
|
||||
@@ -488,6 +506,7 @@ histfile_backup (const char *filename, const char *back)
|
||||
#endif
|
||||
return (history_rename (filename, back));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Restore ORIG from BACKUP handling case where ORIG is a symlink
|
||||
(e.g., ~/.bash_history -> .histfiles/.bash_history.$HOSTNAME) */
|
||||
@@ -708,13 +727,13 @@ static int
|
||||
history_write_slow (int fd, HIST_ENTRY **the_history, int nelements, int overwrite)
|
||||
{
|
||||
FILE *fp;
|
||||
int i, j, e;
|
||||
int i, e;
|
||||
|
||||
fp = fdopen (fd, overwrite ? "w" : "a");
|
||||
if (fp == 0)
|
||||
return -1;
|
||||
|
||||
for (j = 0, i = history_length - nelements; i < history_length; i++)
|
||||
for (i = history_length - nelements; i < history_length; i++)
|
||||
{
|
||||
if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0])
|
||||
fprintf (fp, "%s\n", the_history[i]->timestamp);
|
||||
|
||||
@@ -202,7 +202,7 @@ using_history (void)
|
||||
int
|
||||
history_total_bytes (void)
|
||||
{
|
||||
register int i, result;
|
||||
int i, result;
|
||||
|
||||
for (i = result = 0; the_history && the_history[i]; i++)
|
||||
result += HISTENT_BYTES (the_history[i]);
|
||||
@@ -545,7 +545,7 @@ void
|
||||
_hs_replace_history_data (int which, histdata_t *old, histdata_t *new)
|
||||
{
|
||||
HIST_ENTRY *entry;
|
||||
register int i, last;
|
||||
int i, last;
|
||||
|
||||
if (which < -2 || which >= history_length || history_length == 0 || the_history == 0)
|
||||
return;
|
||||
@@ -581,7 +581,7 @@ _hs_replace_history_data (int which, histdata_t *old, histdata_t *new)
|
||||
int
|
||||
_hs_search_history_data (histdata_t *needle)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
HIST_ENTRY *entry;
|
||||
|
||||
if (history_length == 0 || the_history == 0)
|
||||
@@ -605,10 +605,11 @@ HIST_ENTRY *
|
||||
remove_history (int which)
|
||||
{
|
||||
HIST_ENTRY *return_value;
|
||||
register int i;
|
||||
#if 1
|
||||
int nentries;
|
||||
HIST_ENTRY **start, **end;
|
||||
#else
|
||||
int i;
|
||||
#endif
|
||||
|
||||
if (which < 0 || which >= history_length || history_length == 0 || the_history == 0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* input.c -- character input functions for readline. */
|
||||
|
||||
/* Copyright (C) 1994-2022 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU Readline Library (Readline), a library
|
||||
for reading lines of text with interactive input and history editing.
|
||||
@@ -554,15 +554,15 @@ reset_alarm ()
|
||||
timerclear (&it.it_value);
|
||||
setitimer (ITIMER_REAL, &it, NULL);
|
||||
}
|
||||
# else
|
||||
# if defined (__MINGW32_MAJOR_VERSION)
|
||||
# else /* !HAVE_SETITIMER */
|
||||
# if defined (__MINGW32_MAJOR_VERSION)
|
||||
/* mingw.org's MinGW doesn't have alarm(3). */
|
||||
unsigned int
|
||||
alarm (unsigned int seconds)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
# endif /* __MINGW32_MAJOR_VERSION */
|
||||
|
||||
static int
|
||||
set_alarm (unsigned int *secs, unsigned int *usecs)
|
||||
@@ -578,8 +578,8 @@ reset_alarm ()
|
||||
{
|
||||
alarm (0);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
# endif /* !HAVE_SETITIMER */
|
||||
#endif /* RL_TIMEOUT_USE_SIGALRM */
|
||||
|
||||
/* Set a timeout which will be used for the next call of `readline
|
||||
()'. When (0, 0) are specified the timeout is cleared. */
|
||||
@@ -921,7 +921,7 @@ rl_getc (FILE *stream)
|
||||
|
||||
/* fprintf(stderr, "rl_getc: result = %d errno = %d\n", result, errno); */
|
||||
|
||||
handle_error:
|
||||
/* Handle errors here. */
|
||||
osig = _rl_caught_signal;
|
||||
ostate = rl_readline_state;
|
||||
|
||||
|
||||
@@ -1366,6 +1366,7 @@ readline_default_bindings (void)
|
||||
rl_tty_set_default_bindings (_rl_keymap);
|
||||
}
|
||||
|
||||
#if defined (DEBUG)
|
||||
/* Reset the default bindings for the terminal special characters we're
|
||||
interested in back to rl_insert and read the new ones. */
|
||||
static void
|
||||
@@ -1377,6 +1378,7 @@ reset_default_bindings (void)
|
||||
rl_tty_set_default_bindings (_rl_keymap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Bind some common arrow key sequences in MAP. */
|
||||
static void
|
||||
|
||||
@@ -590,7 +590,6 @@ rl_history_search_internal (int count, int dir)
|
||||
{
|
||||
HIST_ENTRY *temp;
|
||||
int ret, oldpos, newcol;
|
||||
char *t;
|
||||
|
||||
oldpos = where_history (); /* where are we now? */
|
||||
temp = (HIST_ENTRY *)NULL;
|
||||
@@ -650,6 +649,7 @@ rl_history_search_internal (int count, int dir)
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
char *t;
|
||||
t = strstr (rl_line_buffer, history_search_string); /* XXX */
|
||||
rl_point = t ? (int)(t - rl_line_buffer) + _rl_history_search_len : rl_end;
|
||||
#else
|
||||
|
||||
@@ -118,8 +118,10 @@ sh_single_quote (char *string)
|
||||
/* Set the environment variables LINES and COLUMNS to lines and cols,
|
||||
respectively. */
|
||||
static char setenv_buf[INT_STRLEN_BOUND (int) + 1];
|
||||
#if defined (HAVE_PUTENV) && !defined (HAVE_SETENV)
|
||||
static char putenv_buf1[INT_STRLEN_BOUND (int) + 6 + 1]; /* sizeof("LINES=") == 6 */
|
||||
static char putenv_buf2[INT_STRLEN_BOUND (int) + 8 + 1]; /* sizeof("COLUMNS=") == 8 */
|
||||
#endif
|
||||
|
||||
void
|
||||
sh_set_lines_and_columns (int lines, int cols)
|
||||
|
||||
+12
-4
@@ -102,12 +102,20 @@ static char *term_string_buffer = (char *)NULL;
|
||||
|
||||
static int tcap_initialized;
|
||||
|
||||
#if !defined (__linux__) && !defined (NCURSES_VERSION)
|
||||
# if defined (__EMX__) || defined (NEED_EXTERN_PC)
|
||||
/* Systems for which PC/BC/UP are defined in the curses library and need an
|
||||
extern definition here. */
|
||||
#if !defined (__linux__) && !defined (__gnu_hurd__) && !defined (NCURSES_VERSION)
|
||||
# define NEED_EXTERN_PC
|
||||
#endif /* !__linux__ && !__gnu_hurd__ && !NCURSES_VERSION */
|
||||
|
||||
#if defined (__EMX__)
|
||||
# define NEED_EXTERN_PC
|
||||
#endif
|
||||
|
||||
#if defined (NEED_EXTERN_PC)
|
||||
extern
|
||||
# endif /* __EMX__ || NEED_EXTERN_PC */
|
||||
# endif /* NEED_EXTERN_PC */
|
||||
char PC, *BC, *UP;
|
||||
#endif /* !__linux__ && !NCURSES_VERSION */
|
||||
|
||||
/* Some strings to control terminal actions. These are output by tputs (). */
|
||||
char *_rl_term_clreol;
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ _rl_strpbrk (const char *string1, const char *string2)
|
||||
register const char *scan;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
mbstate_t ps;
|
||||
register int i, v;
|
||||
int v;
|
||||
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
#endif
|
||||
|
||||
+70
-53
@@ -57,8 +57,41 @@ void zreset (void);
|
||||
|
||||
int zungetc (int);
|
||||
|
||||
/* Provide one character of pushback whether we are using read or zread. */
|
||||
static int zpushedchar = -1;
|
||||
/* Provide 16 bytes of pushback whether we are using read or zread. Only used
|
||||
by the read builtin when reading invalid multibyte characters. */
|
||||
#define ZPUSHSIZE 16
|
||||
|
||||
static size_t zpushind, zpopind;
|
||||
static unsigned char zpushbuf[ZPUSHSIZE];
|
||||
static unsigned char zbufchar;
|
||||
|
||||
static inline int
|
||||
zbufpop(unsigned char *cp)
|
||||
{
|
||||
if (zpushind == zpopind)
|
||||
return (0);
|
||||
*cp = zpushbuf[zpopind++];
|
||||
if (zpopind == zpushind)
|
||||
zpopind = zpushind = 0; /* reset, buffer empty */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int
|
||||
zbufpush(int c)
|
||||
{
|
||||
if (zpushind == ZPUSHSIZE - 1)
|
||||
return 0;
|
||||
zpushbuf[zpushind++] = c;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Add C to the pushback buffer. Can't push back EOF */
|
||||
int
|
||||
zungetc (int c)
|
||||
{
|
||||
zbufpush (c);
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other
|
||||
error causes the loop to break. */
|
||||
@@ -69,11 +102,10 @@ zread (int fd, char *buf, size_t len)
|
||||
|
||||
check_signals (); /* check for signals before a blocking read */
|
||||
|
||||
/* If we pushed a char back, return it immediately */
|
||||
if (zpushedchar != -1)
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (zbufpop (&zbufchar))
|
||||
{
|
||||
*buf = (unsigned char)zpushedchar;
|
||||
zpushedchar = -1;
|
||||
*buf = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -114,11 +146,10 @@ zreadretry (int fd, char *buf, size_t len)
|
||||
ssize_t r;
|
||||
int nintr;
|
||||
|
||||
/* If we pushed a char back, return it immediately */
|
||||
if (zpushedchar != -1)
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (zbufpop (&zbufchar))
|
||||
{
|
||||
*buf = (unsigned char)zpushedchar;
|
||||
zpushedchar = -1;
|
||||
*buf = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -143,14 +174,13 @@ zreadintr (int fd, char *buf, size_t len)
|
||||
{
|
||||
check_signals ();
|
||||
|
||||
/* If we pushed a char back, return it immediately */
|
||||
if (zpushedchar != -1)
|
||||
{
|
||||
*buf = (unsigned char)zpushedchar;
|
||||
zpushedchar = -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (zbufpop (&zbufchar))
|
||||
{
|
||||
*buf = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return (read (fd, buf, len));
|
||||
}
|
||||
|
||||
@@ -166,14 +196,13 @@ zreadc (int fd, char *cp)
|
||||
{
|
||||
ssize_t nr;
|
||||
|
||||
/* If we pushed a char back, return it immediately */
|
||||
if (zpushedchar != -1 && cp)
|
||||
{
|
||||
*cp = (unsigned char)zpushedchar;
|
||||
zpushedchar = -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (cp && zbufpop (&zbufchar))
|
||||
{
|
||||
*cp = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lind == lused || lused == 0)
|
||||
{
|
||||
nr = zread (fd, lbuf, sizeof (lbuf));
|
||||
@@ -197,12 +226,11 @@ zreadcintr (int fd, char *cp)
|
||||
{
|
||||
ssize_t nr;
|
||||
|
||||
/* If we pushed a char back, return it immediately */
|
||||
if (zpushedchar != -1 && cp)
|
||||
{
|
||||
*cp = (unsigned char)zpushedchar;
|
||||
zpushedchar = -1;
|
||||
return 1;
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (cp && zbufpop (&zbufchar))
|
||||
{
|
||||
*cp = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lind == lused || lused == 0)
|
||||
@@ -228,11 +256,11 @@ zreadn (int fd, char *cp, size_t len)
|
||||
{
|
||||
ssize_t nr;
|
||||
|
||||
if (zpushedchar != -1 && cp)
|
||||
{
|
||||
*cp = zpushedchar;
|
||||
zpushedchar = -1;
|
||||
return 1;
|
||||
/* If we pushed chars back, return the oldest one immediately */
|
||||
if (cp && zbufpop (&zbufchar))
|
||||
{
|
||||
*cp = zbufchar;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lind == lused || lused == 0)
|
||||
@@ -253,25 +281,11 @@ zreadn (int fd, char *cp, size_t len)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
zungetc (int c)
|
||||
{
|
||||
if (zpushedchar == -1)
|
||||
{
|
||||
zpushedchar = c;
|
||||
return c;
|
||||
}
|
||||
|
||||
if (c == EOF || lind == 0)
|
||||
return (EOF);
|
||||
lbuf[--lind] = c; /* XXX */
|
||||
return c;
|
||||
}
|
||||
|
||||
void
|
||||
zreset (void)
|
||||
{
|
||||
lind = lused = 0;
|
||||
zpushind = zpopind = 0;
|
||||
}
|
||||
|
||||
/* Sync the seek pointer for FD so that the kernel's idea of the last char
|
||||
@@ -287,5 +301,8 @@ zsyncfd (int fd)
|
||||
r = lseek (fd, -off, SEEK_CUR);
|
||||
|
||||
if (r != -1)
|
||||
lused = lind = 0;
|
||||
{
|
||||
lused = lind = 0;
|
||||
zpushind = zpopind = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2214,7 +2214,15 @@ read_a_line (int remove_quoted_newline)
|
||||
QUIT;
|
||||
|
||||
/* If we're reading the here-document from an alias, use shell_getc */
|
||||
c = heredoc_string ? shell_getc (0) : yy_getc ();
|
||||
if (interactive && EOF_Reached && heredoc_string == 0)
|
||||
{
|
||||
c = EOF;
|
||||
EOF_Reached = 0;
|
||||
if (current_token == yacc_EOF)
|
||||
current_token = '\n'; /* reset state */
|
||||
}
|
||||
else
|
||||
c = heredoc_string ? shell_getc (0) : yy_getc ();
|
||||
|
||||
/* Ignore null bytes in input. */
|
||||
if (c == 0)
|
||||
@@ -2451,7 +2459,10 @@ static struct dstack temp_dstack = { (char *)NULL, 0, 0 };
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define pop_delimiter(ds) ds.delimiter_depth--
|
||||
/* The parsing or expansion code may have called reset_parser() between the
|
||||
time push_delimiter was called and this call to pop_delimiter, which resets
|
||||
delimiter_depth to 0, so we check. */
|
||||
#define pop_delimiter(ds) do { if (ds.delimiter_depth > 0) ds.delimiter_depth--; } while (0)
|
||||
|
||||
/* Return the next shell input character. This always reads characters
|
||||
from shell_input_line; when that line is exhausted, it is time to
|
||||
@@ -4983,11 +4994,12 @@ parse_arith_cmd (char **ep, int adddq)
|
||||
}
|
||||
else /* nested subshell */
|
||||
{
|
||||
shell_ungetc (c);
|
||||
|
||||
tokstr[0] = '(';
|
||||
strncpy (tokstr + 1, ttok, ttoklen - 1);
|
||||
tokstr[ttoklen] = ')';
|
||||
tokstr[ttoklen+1] = c;
|
||||
tokstr[ttoklen+2] = '\0';
|
||||
tokstr[ttoklen+1] = '\0';
|
||||
}
|
||||
|
||||
*ep = tokstr;
|
||||
@@ -5990,6 +6002,10 @@ static const int no_semi_successors[] = {
|
||||
0
|
||||
};
|
||||
|
||||
static const int no_semi_predecessors[] = {
|
||||
'&', '|', ';', 0
|
||||
};
|
||||
|
||||
/* If we are not within a delimited expression, try to be smart
|
||||
about which separators can be semi-colons and which must be
|
||||
newlines. Returns the string that should be added into the
|
||||
@@ -5999,6 +6015,7 @@ char *
|
||||
history_delimiting_chars (const char *line)
|
||||
{
|
||||
static int last_was_heredoc = 0; /* was the last entry the start of a here document? */
|
||||
const char *lp;
|
||||
register int i;
|
||||
|
||||
if ((parser_state & PST_HEREDOC) == 0)
|
||||
@@ -6045,6 +6062,9 @@ history_delimiting_chars (const char *line)
|
||||
if (parser_state & PST_COMPASSIGN)
|
||||
return (" ");
|
||||
|
||||
for (lp = line; *lp && shellblank(*lp); lp++)
|
||||
;
|
||||
|
||||
/* First, handle some special cases. */
|
||||
/*(*/
|
||||
/* If we just read `()', assume it's a function definition, and don't
|
||||
@@ -6061,7 +6081,15 @@ history_delimiting_chars (const char *line)
|
||||
else if (parser_state & PST_CASESTMT) /* case statement pattern */
|
||||
return " ";
|
||||
else
|
||||
return "; "; /* (...) subshell */
|
||||
{
|
||||
/* (...) subshell. Make sure this line doesn't start with an
|
||||
operator that cannot be preceded by a semicolon. If it can't
|
||||
(basically the command terminators), return a newline. */
|
||||
for (i = 0; no_semi_predecessors[i]; i++)
|
||||
if (*lp == no_semi_predecessors[i])
|
||||
return "\n";
|
||||
return "; ";
|
||||
}
|
||||
}
|
||||
else if (token_before_that == WORD && two_tokens_ago == FUNCTION)
|
||||
return " "; /* function def using `function name' without `()' */
|
||||
|
||||
-193
@@ -1,193 +0,0 @@
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
|
||||
especially those whose name start with YY_ or yy_. They are
|
||||
private implementation details that can be changed or removed. */
|
||||
|
||||
#ifndef YY_YY_Y_TAB_H_INCLUDED
|
||||
# define YY_YY_Y_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token kinds. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
YYEMPTY = -2,
|
||||
YYEOF = 0, /* "end of file" */
|
||||
YYerror = 256, /* error */
|
||||
YYUNDEF = 257, /* "invalid token" */
|
||||
IF = 258, /* IF */
|
||||
THEN = 259, /* THEN */
|
||||
ELSE = 260, /* ELSE */
|
||||
ELIF = 261, /* ELIF */
|
||||
FI = 262, /* FI */
|
||||
CASE = 263, /* CASE */
|
||||
ESAC = 264, /* ESAC */
|
||||
FOR = 265, /* FOR */
|
||||
SELECT = 266, /* SELECT */
|
||||
WHILE = 267, /* WHILE */
|
||||
UNTIL = 268, /* UNTIL */
|
||||
DO = 269, /* DO */
|
||||
DONE = 270, /* DONE */
|
||||
FUNCTION = 271, /* FUNCTION */
|
||||
COPROC = 272, /* COPROC */
|
||||
COND_START = 273, /* COND_START */
|
||||
COND_END = 274, /* COND_END */
|
||||
COND_ERROR = 275, /* COND_ERROR */
|
||||
IN = 276, /* IN */
|
||||
BANG = 277, /* BANG */
|
||||
TIME = 278, /* TIME */
|
||||
TIMEOPT = 279, /* TIMEOPT */
|
||||
TIMEIGN = 280, /* TIMEIGN */
|
||||
WORD = 281, /* WORD */
|
||||
ASSIGNMENT_WORD = 282, /* ASSIGNMENT_WORD */
|
||||
REDIR_WORD = 283, /* REDIR_WORD */
|
||||
NUMBER = 284, /* NUMBER */
|
||||
ARITH_CMD = 285, /* ARITH_CMD */
|
||||
ARITH_FOR_EXPRS = 286, /* ARITH_FOR_EXPRS */
|
||||
COND_CMD = 287, /* COND_CMD */
|
||||
AND_AND = 288, /* AND_AND */
|
||||
OR_OR = 289, /* OR_OR */
|
||||
GREATER_GREATER = 290, /* GREATER_GREATER */
|
||||
LESS_LESS = 291, /* LESS_LESS */
|
||||
LESS_AND = 292, /* LESS_AND */
|
||||
LESS_LESS_LESS = 293, /* LESS_LESS_LESS */
|
||||
GREATER_AND = 294, /* GREATER_AND */
|
||||
SEMI_SEMI = 295, /* SEMI_SEMI */
|
||||
SEMI_AND = 296, /* SEMI_AND */
|
||||
SEMI_SEMI_AND = 297, /* SEMI_SEMI_AND */
|
||||
LESS_LESS_MINUS = 298, /* LESS_LESS_MINUS */
|
||||
AND_GREATER = 299, /* AND_GREATER */
|
||||
AND_GREATER_GREATER = 300, /* AND_GREATER_GREATER */
|
||||
LESS_GREATER = 301, /* LESS_GREATER */
|
||||
GREATER_BAR = 302, /* GREATER_BAR */
|
||||
BAR_AND = 303, /* BAR_AND */
|
||||
DOLPAREN = 304, /* DOLPAREN */
|
||||
DOLBRACE = 305, /* DOLBRACE */
|
||||
yacc_EOF = 306 /* yacc_EOF */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
/* Token kinds. */
|
||||
#define YYEMPTY -2
|
||||
#define YYEOF 0
|
||||
#define YYerror 256
|
||||
#define YYUNDEF 257
|
||||
#define IF 258
|
||||
#define THEN 259
|
||||
#define ELSE 260
|
||||
#define ELIF 261
|
||||
#define FI 262
|
||||
#define CASE 263
|
||||
#define ESAC 264
|
||||
#define FOR 265
|
||||
#define SELECT 266
|
||||
#define WHILE 267
|
||||
#define UNTIL 268
|
||||
#define DO 269
|
||||
#define DONE 270
|
||||
#define FUNCTION 271
|
||||
#define COPROC 272
|
||||
#define COND_START 273
|
||||
#define COND_END 274
|
||||
#define COND_ERROR 275
|
||||
#define IN 276
|
||||
#define BANG 277
|
||||
#define TIME 278
|
||||
#define TIMEOPT 279
|
||||
#define TIMEIGN 280
|
||||
#define WORD 281
|
||||
#define ASSIGNMENT_WORD 282
|
||||
#define REDIR_WORD 283
|
||||
#define NUMBER 284
|
||||
#define ARITH_CMD 285
|
||||
#define ARITH_FOR_EXPRS 286
|
||||
#define COND_CMD 287
|
||||
#define AND_AND 288
|
||||
#define OR_OR 289
|
||||
#define GREATER_GREATER 290
|
||||
#define LESS_LESS 291
|
||||
#define LESS_AND 292
|
||||
#define LESS_LESS_LESS 293
|
||||
#define GREATER_AND 294
|
||||
#define SEMI_SEMI 295
|
||||
#define SEMI_AND 296
|
||||
#define SEMI_SEMI_AND 297
|
||||
#define LESS_LESS_MINUS 298
|
||||
#define AND_GREATER 299
|
||||
#define AND_GREATER_GREATER 300
|
||||
#define LESS_GREATER 301
|
||||
#define GREATER_BAR 302
|
||||
#define BAR_AND 303
|
||||
#define DOLPAREN 304
|
||||
#define DOLBRACE 305
|
||||
#define yacc_EOF 306
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 375 "/usr/local/src/chet/src/bash/src/parse.y"
|
||||
|
||||
WORD_DESC *word; /* the word that we read. */
|
||||
int number; /* the number that we read. */
|
||||
WORD_LIST *word_list;
|
||||
COMMAND *command;
|
||||
REDIRECT *redirect;
|
||||
ELEMENT element;
|
||||
PATTERN_LIST *pattern;
|
||||
|
||||
#line 179 "y.tab.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
|
||||
#endif /* !YY_YY_Y_TAB_H_INCLUDED */
|
||||
|
||||
+252
-244
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+307
-342
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+304
-341
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user