mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-29 08:29:54 +02:00
Bash-5.2-rc3 release
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
This document details the changes between this version, bash-5.2-rc3, and
|
||||
the previous version, bash-5.2-rc2.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Added a compatibility mode feature that causes the parser to parse command
|
||||
substitutions as if extglob were enabled. If it is enabled before execution,
|
||||
parse at execution will succeed. If not, the subsequent execution parse will
|
||||
fail.
|
||||
|
||||
b. Fixed an issue with handling a `return' executed in a trap action if the
|
||||
trap is executed while running in a shell function.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
a. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
|
||||
each time it is called, and modifies the appropriate locale-specific display
|
||||
and key binding variables when the locale changes.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-5.2-rc2, and
|
||||
the previous version, bash-5.2-rc1.
|
||||
|
||||
@@ -444,7 +468,7 @@ z. The new `--enable-translatable-strings' option to `configure' allows $"..."
|
||||
support to be compiled in or out.
|
||||
|
||||
aa. The new `globskipdots' shell option forces pathname expansion never to
|
||||
return `.' or `..' unless explicitly matched.
|
||||
return `.' or `..' unless explicitly matched. It is enabled by default.
|
||||
|
||||
bb. Array references using `@' and `*' that are the value of nameref variables
|
||||
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
|
||||
@@ -4513,7 +4537,7 @@ l. There is a new configuration option (in config-top.h) that forces bash to
|
||||
m. A new variable $BASHOPTS to export shell options settable using `shopt' to
|
||||
child processes.
|
||||
|
||||
n. There is a new confgure option that forces the extglob option to be
|
||||
n. There is a new configure option that forces the extglob option to be
|
||||
enabled by default.
|
||||
|
||||
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
|
||||
@@ -4554,7 +4578,7 @@ d. New bindable function: skip-csi-sequence. Can be used as a default to
|
||||
to bind all keys.
|
||||
|
||||
e. New application-settable function: rl_filename_rewrite_hook. Can be used
|
||||
to rewite or modify filenames read from the file system before they are
|
||||
to rewrite or modify filenames read from the file system before they are
|
||||
compared to the word to be completed.
|
||||
|
||||
f. New bindable variable: skip-completed-text, active when completing in the
|
||||
@@ -4636,7 +4660,7 @@ and the previous version, bash-4.0-beta2.
|
||||
1. Changes to Bash
|
||||
|
||||
a. Fixed a bug that caused parsing errors when a $()-style command
|
||||
substitution was follwed immediately by a quoted newline.
|
||||
substitution was followed immediately by a quoted newline.
|
||||
|
||||
b. Fixed a bug that caused extended shell globbing patterns beginning with
|
||||
`*(' to not work when used with pattern substitution word expansions.
|
||||
@@ -9572,7 +9596,7 @@ gg. `alias' and `unalias' now print error messages when passed an argument
|
||||
not interactive, as POSIX.2 specifies.
|
||||
|
||||
hh. `alias' and `alias -p' now return a status of 0 when no aliases are
|
||||
defined, as POSIX.2 specifes.
|
||||
defined, as POSIX.2 specifies.
|
||||
|
||||
ii. `cd -' now prints the pathname of the new working directory if the shell
|
||||
is interactive.
|
||||
|
||||
+25
-1
@@ -1,3 +1,27 @@
|
||||
This document details the changes between this version, bash-5.2-rc3, and
|
||||
the previous version, bash-5.2-rc2.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Added a compatibility mode feature that causes the parser to parse command
|
||||
substitutions as if extglob were enabled. If it is enabled before execution,
|
||||
parse at execution will succeed. If not, the subsequent execution parse will
|
||||
fail.
|
||||
|
||||
b. Fixed an issue with handling a `return' executed in a trap action if the
|
||||
trap is executed while running in a shell function.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
a. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
|
||||
each time it is called, and modifies the appropriate locale-specific display
|
||||
and key binding variables when the locale changes.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-5.2-rc2, and
|
||||
the previous version, bash-5.2-rc1.
|
||||
|
||||
@@ -444,7 +468,7 @@ z. The new `--enable-translatable-strings' option to `configure' allows $"..."
|
||||
support to be compiled in or out.
|
||||
|
||||
aa. The new `globskipdots' shell option forces pathname expansion never to
|
||||
return `.' or `..' unless explicitly matched.
|
||||
return `.' or `..' unless explicitly matched. It is enabled by default.
|
||||
|
||||
bb. Array references using `@' and `*' that are the value of nameref variables
|
||||
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
|
||||
|
||||
@@ -579,7 +579,14 @@ compat51 (set using BASH_COMPAT)
|
||||
- the ${param[:]=value} word expansion will return VALUE, before any
|
||||
variable-specific transformations have been performed (e.g.,
|
||||
converting to lowercase). Bash-5.2 will return the final value
|
||||
assigned to the variable, as POSIX specifies
|
||||
assigned to the variable, as POSIX specifies;
|
||||
- Parsing command substitutions will act as if extended glob is
|
||||
enabled, so that parsing a command substitution containing an extglob
|
||||
pattern (say, as part of a shell function) will not fail. This
|
||||
assumes the intent is to enable extglob before the command is
|
||||
executed and word expansions are performed. It will fail at word
|
||||
expansion time if extglob hasn't been enabled by the time the
|
||||
command is executed.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -3821,3 +3821,87 @@ subst.c
|
||||
----
|
||||
|
||||
[bash-5.2-rc2 frozen]
|
||||
|
||||
7/27
|
||||
----
|
||||
parse.y
|
||||
- reset_parser: set need_here_doc, esacs_needed_count, expecting_in_token
|
||||
all to 0, since jumping back to a top-level parse needs that
|
||||
- parse_comsub: make sure to reset expand_aliases and shell_eof_token
|
||||
if we're not going to exit immediately out of this function
|
||||
|
||||
7/28
|
||||
----
|
||||
parse.y
|
||||
- parse_comsub: if the compatibility level is <= 51, set extglob while
|
||||
parsing the command substitution, so bad pattern errors can still be
|
||||
caught but valid patterns are let through and can be evaluated at
|
||||
runtime, when extglob may have been set. If it isn't set, it will
|
||||
still be a parser error when the command substitution is executed.
|
||||
Fixes report from Sam James <sam@gentoo.org> about gentoo scripts.
|
||||
- reset_parser: set extended_glob from global_extglob if the parser
|
||||
state includes PST_CMDSUBST
|
||||
- xparse_dolparen: set global_extglob but don't modify extended_glob,
|
||||
so parse errors can be caught before forking a child for command
|
||||
substitution, as part of word expansion, but after extglob may have
|
||||
been set by command execution (e.g., in a shell function)
|
||||
|
||||
8/5
|
||||
---
|
||||
[bump version to bash-5.2-rc3]
|
||||
|
||||
8/6
|
||||
---
|
||||
trap.c
|
||||
- run_pending_traps: move code from evalstring() so we call
|
||||
parse_and_execute() directly and handle any `return' invocations so
|
||||
we can restore the value of running_trap. Otherwise, if we longjmp
|
||||
past this function, we will think we're running a trap after we
|
||||
finish. Prompted by post from Koichi Murase <myoga.murase@gmail.com>
|
||||
|
||||
8/9
|
||||
---
|
||||
|
||||
lib/readline/nls.c
|
||||
- _rl_current_locale: private variable, stores the value of the
|
||||
LC_CTYPE locale category, as determined by _rl_init_locale; set
|
||||
to allocated memory in _rl_init_locale()
|
||||
- _rl_set_localevars: new function, code from _rl_init_eightbit that
|
||||
checks the current locale (passed as an argument) and sets the
|
||||
various locale-aware variables based on it. It accepts a second
|
||||
argument: FORCE. If non-zero, it means to restore the default "C"
|
||||
locale values if the locale is "C" or "POSIX", now that this
|
||||
function can be called multiple times
|
||||
- _rl_init_eightbit: now just calls _rl_init_locale and
|
||||
_rl_set_localevars
|
||||
- _rl_reset_locale: new function, checks whether our the locale has
|
||||
changed since we last called _rl_init_locale to set our internal
|
||||
idea of its value. If it has changed, call _rl_set_localevars with
|
||||
the new locale and a FORCE argument of 1 to change the
|
||||
locale-dependent variables.
|
||||
|
||||
lib/readline/rlprivate.h
|
||||
- _rl_reset_locale: extern declaration
|
||||
|
||||
lib/readline/readline.c
|
||||
- rl_initialize: call _rl_reset_locale instead of _rl_init_locale so
|
||||
the internal readline variables get set when we move from a non-
|
||||
multibyte locale ("C") to a multibyte one ("en_US.UTF-8"). Report
|
||||
from Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
8/16
|
||||
----
|
||||
lib/sh/setlinebuf.c
|
||||
- sh_setlinebuf: allocate buffers for line-buffering stdout and stderr
|
||||
only once, the first time it is requested. Only allocate memory if
|
||||
we're using setvbuf (we usually are). Double the buffer size to 2016
|
||||
if we're using the bash malloc. Otherwise, let stdio handle it.
|
||||
|
||||
8/17
|
||||
----
|
||||
builtins/exec.def
|
||||
- exec_builtin: make sure to initialize orig_job_control in case the
|
||||
command is not found by search_for_command. Report and fix from
|
||||
Xiami <i@f2light.com>
|
||||
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ the Bash 'configure' recognizes.
|
||||
|
||||
'--with-libintl-prefix[=PREFIX]'
|
||||
Define this to make Bash link with a locally-installed version of
|
||||
the libintl library instead ofthe version in 'lib/intl'.
|
||||
the libintl library instead of the version in 'lib/intl'.
|
||||
|
||||
'--with-libiconv-prefix[=PREFIX]'
|
||||
Define this to make Bash look for libiconv in PREFIX instead of the
|
||||
|
||||
@@ -210,7 +210,7 @@ builtins/psize.sh f
|
||||
builtins/bashgetopt.c f
|
||||
builtins/common.h f
|
||||
builtins/bashgetopt.h f
|
||||
cross-build/cygwin32.cache f
|
||||
#cross-build/cygwin32.cache f
|
||||
cross-build/x86-beos.cache f
|
||||
cross-build/opennt.cache f
|
||||
cross-build/qnx.cache f
|
||||
@@ -735,6 +735,7 @@ examples/loadables/fdflags.c f
|
||||
examples/loadables/finfo.c f
|
||||
examples/loadables/cat.c f
|
||||
examples/loadables/csv.c f
|
||||
examples/loadables/dsv.c f
|
||||
examples/loadables/cut.c f
|
||||
examples/loadables/logname.c f
|
||||
examples/loadables/basename.c f
|
||||
|
||||
+3
-2
@@ -176,7 +176,8 @@ GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses
|
||||
-Wcast-align -Wstrict-prototypes -Wconversion -Wformat \
|
||||
-Wformat-nonliteral -Wmissing-braces -Wuninitialized \
|
||||
-Wmissing-declarations -Winline \
|
||||
-Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
|
||||
-Wmissing-prototypes -Wtraditional -Wredundant-decls \
|
||||
-Wformat-security -pedantic
|
||||
|
||||
GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS)
|
||||
|
||||
@@ -615,7 +616,7 @@ strip: $(Program) .made
|
||||
-$(SIZE) $(Program)
|
||||
|
||||
lint:
|
||||
${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made
|
||||
${MAKE} ${MFLAGS} ADDON_CFLAGS='${GCC_LINT_FLAGS}' .made
|
||||
|
||||
asan:
|
||||
${MAKE} ${MFLAGS} ADDON_CFLAGS='${ASAN_XCFLAGS}' ADDON_LDFLAGS='${ASAN_XLDFLAGS}' .made
|
||||
|
||||
@@ -94,7 +94,7 @@ z. The new `--enable-translatable-strings' option to `configure' allows $"..."
|
||||
support to be compiled in or out.
|
||||
|
||||
aa. The new `globskipdots' shell option forces pathname expansion never to
|
||||
return `.' or `..' unless explicitly matched.
|
||||
return `.' or `..' unless explicitly matched. It is enabled by default.
|
||||
|
||||
bb. Array references using `@' and `*' that are the value of nameref variables
|
||||
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
|
||||
@@ -164,6 +164,10 @@ l. There is a new configuration option: --with-shared-termcap-library, which
|
||||
forces linking the shared readline library with the shared termcap (or
|
||||
curses/ncurses/termlib) library so applications don't have to do it.
|
||||
|
||||
m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
|
||||
each time it is called, and modifies the appropriate locale-specific display
|
||||
and key binding variables when the locale changes.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
This is a terse description of the new features added to bash-5.1 since
|
||||
the release of bash-5.0. As always, the manual page (doc/bash.1) is
|
||||
@@ -1083,7 +1087,7 @@ l. There is a new configuration option (in config-top.h) that forces bash to
|
||||
m. A new variable $BASHOPTS to export shell options settable using `shopt' to
|
||||
child processes.
|
||||
|
||||
n. There is a new confgure option that forces the extglob option to be
|
||||
n. There is a new configure option that forces the extglob option to be
|
||||
enabled by default.
|
||||
|
||||
o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
|
||||
@@ -1130,7 +1134,7 @@ d. New bindable function: skip-csi-sequence. Can be used as a default to
|
||||
to bind all keys.
|
||||
|
||||
e. New application-settable function: rl_filename_rewrite_hook. Can be used
|
||||
to rewite or modify filenames read from the file system before they are
|
||||
to rewrite or modify filenames read from the file system before they are
|
||||
compared to the word to be completed.
|
||||
|
||||
f. New bindable variable: skip-completed-text, active when completing in the
|
||||
|
||||
@@ -94,7 +94,7 @@ z. The new `--enable-translatable-strings' option to `configure' allows $"..."
|
||||
support to be compiled in or out.
|
||||
|
||||
aa. The new `globskipdots' shell option forces pathname expansion never to
|
||||
return `.' or `..' unless explicitly matched.
|
||||
return `.' or `..' unless explicitly matched. It is enabled by default.
|
||||
|
||||
bb. Array references using `@' and `*' that are the value of nameref variables
|
||||
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
|
||||
@@ -163,3 +163,7 @@ k. New readline state (RL_STATE_EOF) and application-visible variable
|
||||
l. There is a new configuration option: --with-shared-termcap-library, which
|
||||
forces linking the shared readline library with the shared termcap (or
|
||||
curses/ncurses/termlib) library so applications don't have to do it.
|
||||
|
||||
m. Readline now checks for changes to locale settings (LC_ALL/LC_CTYPE/LANG)
|
||||
each time it is called, and modifies the appropriate locale-specific display
|
||||
and key binding variables when the locale changes.
|
||||
|
||||
@@ -240,7 +240,7 @@ The following list is what's changed when 'POSIX mode' is in effect:
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
60. The 'printf' builtin uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
|
||||
@@ -25,7 +25,7 @@ version 3 of the License (or any later version). For more information,
|
||||
see the file COPYING.
|
||||
|
||||
A number of frequently-asked questions are answered in the file
|
||||
`doc/FAQ'.
|
||||
`doc/FAQ'. (That file is no longer updated.)
|
||||
|
||||
To compile Bash, type `./configure', then `make'. Bash auto-configures
|
||||
the build process, so no further intervention should be necessary. Bash
|
||||
@@ -94,12 +94,13 @@ Other Packages
|
||||
This distribution includes, in examples/bash-completion, a recent version
|
||||
of the `bash-completion' package, which provides programmable completions
|
||||
for a number of commands. It's available as a package in many distributions,
|
||||
and that is the first place from which to obtain it. If it's not a package
|
||||
from your vendor, you may install the included version.
|
||||
and that is the first place from which to obtain it.
|
||||
|
||||
The latest version of bash-completion is always available from
|
||||
https://github.com/scop/bash-completion.
|
||||
|
||||
If it's not a package from your vendor, you may install the included version.
|
||||
|
||||
Enjoy!
|
||||
|
||||
Chet Ramey
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ exec_builtin (list)
|
||||
int cleanenv, login, opt, orig_job_control;
|
||||
char *argv0, *command, **args, **env, *newname, *com2;
|
||||
|
||||
cleanenv = login = 0;
|
||||
cleanenv = login = orig_job_control = 0;
|
||||
exec_argv0 = argv0 = (char *)NULL;
|
||||
|
||||
reset_internal_getopt ();
|
||||
|
||||
@@ -376,7 +376,7 @@ show_all_var_attributes (v, nodefs)
|
||||
}
|
||||
|
||||
/* Show all local variable variables with their attributes. This shows unset
|
||||
local variables (all_local_variables called with 0 argment). */
|
||||
local variables (all_local_variables called with 0 argument). */
|
||||
int
|
||||
show_local_var_attributes (v, nodefs)
|
||||
int v, nodefs;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.2, version 5.043.
|
||||
# From configure.ac for Bash 5.2, version 5.044.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for bash 5.2-rc2.
|
||||
# Generated by GNU Autoconf 2.71 for bash 5.2-rc3.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -612,8 +612,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='5.2-rc2'
|
||||
PACKAGE_STRING='bash 5.2-rc2'
|
||||
PACKAGE_VERSION='5.2-rc3'
|
||||
PACKAGE_STRING='bash 5.2-rc3'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1467,7 +1467,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.2-rc2 to adapt to many kinds of systems.
|
||||
\`configure' configures bash 5.2-rc3 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1533,7 +1533,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 5.2-rc2:";;
|
||||
short | recursive ) echo "Configuration of bash 5.2-rc3:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1740,7 +1740,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 5.2-rc2
|
||||
bash configure 5.2-rc3
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -2397,7 +2397,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.2-rc2, which was
|
||||
It was created by bash $as_me 5.2-rc3, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -3176,7 +3176,7 @@ ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=5.2
|
||||
RELSTATUS=rc2
|
||||
RELSTATUS=rc3
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -22369,7 +22369,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.2-rc2, which was
|
||||
This file was extended by bash $as_me 5.2-rc3, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -22437,7 +22437,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.2-rc2
|
||||
bash config.status 5.2-rc3
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
+2
-2
@@ -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.2, version 5.043])dnl
|
||||
AC_REVISION([for Bash 5.2, version 5.044])dnl
|
||||
|
||||
define(bashvers, 5.2)
|
||||
define(relstatus, rc2)
|
||||
define(relstatus, rc3)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ o There is a new configuration option (in config-top.h) that forces bash to
|
||||
o A new variable $BASHOPTS to export shell options settable using `shopt' to
|
||||
child processes.
|
||||
|
||||
o There is a new confgure option that forces the extglob option to be
|
||||
o There is a new configure option that forces the extglob option to be
|
||||
enabled by default.
|
||||
|
||||
o New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
|
||||
|
||||
+1
-3
@@ -531,7 +531,7 @@ _c_o_m_m_a_n_d _h_i_s_t_o_r_y) is provided jointly by Bash
|
||||
readline library. Bash provides variables ($HISTFILE,
|
||||
$HISTSIZE, and $HISTCONTROL) and the _h_i_s_t_o_r_y and _f_c builtins
|
||||
to manipulate the history list. The value of $_H_I_S_T_F_I_L_E
|
||||
specifes the file where Bash writes the command history on
|
||||
specifies the file where Bash writes the command history on
|
||||
exit and reads it on startup. $_H_I_S_T_S_I_Z_E is used to limit
|
||||
the number of commands saved in the history. $_H_I_S_T_C_O_N_T_R_O_L
|
||||
provides a crude form of control over which commands are
|
||||
@@ -1107,5 +1107,3 @@ Inc.
|
||||
|
||||
|
||||
October 28, 1994
|
||||
|
||||
|
||||
|
||||
+1448
-1437
File diff suppressed because it is too large
Load Diff
+14
-2
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Jun 16 17:10:54 EDT 2022
|
||||
.\" Last Change: Fri Jul 29 08:59:32 EDT 2022
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2022 June 16" "GNU Bash 5.2"
|
||||
.TH BASH 1 "2022 July 29" "GNU Bash 5.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -3984,6 +3984,12 @@ Matches anything except one of the given patterns
|
||||
.RE
|
||||
.PD
|
||||
.PP
|
||||
The\fBextglob\fP option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make sure
|
||||
that \fBextglob\fP is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
.PP
|
||||
When matching filenames, the \fBdotglob\fP shell option determines
|
||||
the set of filenames that are tested:
|
||||
when \fBdotglob\fP is enabled, the set of filenames includes all files
|
||||
@@ -6057,6 +6063,8 @@ by stripping the eighth bit and prefixing an
|
||||
escape character (in effect, using escape as the \fImeta prefix\fP).
|
||||
The default is \fIOn\fP, but readline will set it to \fIOff\fP if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
may change if the locale is changed.
|
||||
.TP
|
||||
.B disable\-completion (Off)
|
||||
If set to \fBOn\fP, readline will inhibit word completion. Completion
|
||||
@@ -6151,6 +6159,8 @@ regardless of what the terminal claims it can support. The name
|
||||
is a synonym for this variable.
|
||||
The default is \fIOff\fP, but readline will set it to \fIOn\fP if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
may change if the locale is changed.
|
||||
.TP
|
||||
.B isearch\-terminators (``C\-[C\-J'')
|
||||
The string of characters that should terminate an incremental
|
||||
@@ -6214,6 +6224,8 @@ eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is \fIOff\fP, but readline will set it to \fIOn\fP if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the \fBLC_CTYPE\fP locale category, and
|
||||
may change if the locale is changed.
|
||||
.TP
|
||||
.B page\-completions (On)
|
||||
If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager
|
||||
|
||||
+134
-40
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2022 June 3<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2022 July 29<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -1112,24 +1112,28 @@ The return value is the exit status of the last command in <I>list</I>
|
||||
that is executed, or false if any of the expressions is invalid.
|
||||
<DT><B>select</B> <I>name</I> [ <B>in</B> <I>word</I> ] ; <B>do</B> <I>list</I> ; <B>done</B><DD>
|
||||
The list of words following <B>in</B> is expanded, generating a list
|
||||
of items. The set of expanded words is printed on the standard
|
||||
of items, and the set of expanded words is printed on the standard
|
||||
error, each preceded by a number. If the <B>in</B>
|
||||
<I>word</I> is omitted, the positional parameters are printed (see
|
||||
<FONT SIZE=-1><B>PARAMETERS</B>
|
||||
|
||||
</FONT>
|
||||
below). The
|
||||
below).
|
||||
<B>select</B>
|
||||
|
||||
then displays the
|
||||
<FONT SIZE=-1><B>PS3</B>
|
||||
|
||||
</FONT>
|
||||
prompt is then displayed and a line read from the standard input.
|
||||
prompt and reads a line from the standard input.
|
||||
If the line consists of a number corresponding to one of
|
||||
the displayed words, then the value of
|
||||
<I>name</I>
|
||||
|
||||
is set to that word. If the line is empty, the words and prompt
|
||||
are displayed again. If EOF is read, the command completes. Any
|
||||
other value read causes
|
||||
is set to that word.
|
||||
If the line is empty, the words and prompt are displayed again.
|
||||
If EOF is read, the <B>select</B> command completes and returns 1.
|
||||
Any other value read causes
|
||||
<I>name</I>
|
||||
|
||||
to be set to null. The line read is saved in the variable
|
||||
@@ -4990,6 +4994,13 @@ Matches anything except one of the given patterns
|
||||
|
||||
<P>
|
||||
|
||||
The<B>extglob</B> option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make sure
|
||||
that <B>extglob</B> is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
<P>
|
||||
|
||||
When matching filenames, the <B>dotglob</B> shell option determines
|
||||
the set of filenames that are tested:
|
||||
when <B>dotglob</B> is enabled, the set of filenames includes all files
|
||||
@@ -7695,6 +7706,8 @@ by stripping the eighth bit and prefixing an
|
||||
escape character (in effect, using escape as the <I>meta prefix</I>).
|
||||
The default is <I>On</I>, but readline will set it to <I>Off</I> if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the <B>LC_CTYPE</B> locale category, and
|
||||
may change if the locale is changed.
|
||||
<DT><B>disable-completion (Off)</B>
|
||||
|
||||
<DD>
|
||||
@@ -7806,6 +7819,8 @@ regardless of what the terminal claims it can support. The name
|
||||
is a synonym for this variable.
|
||||
The default is <I>Off</I>, but readline will set it to <I>On</I> if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the <B>LC_CTYPE</B> locale category, and
|
||||
may change if the locale is changed.
|
||||
<DT><B>isearch-terminators (``C-[C-J'')</B>
|
||||
|
||||
<DD>
|
||||
@@ -7881,6 +7896,8 @@ eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is <I>Off</I>, but readline will set it to <I>On</I> if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the <B>LC_CTYPE</B> locale category, and
|
||||
may change if the locale is changed.
|
||||
<DT><B>page-completions (On)</B>
|
||||
|
||||
<DD>
|
||||
@@ -10217,7 +10234,9 @@ If any of <B>-D</B>, <B>-E</B>, or <B>-I</B> are supplied, any other
|
||||
specified by the option.
|
||||
<P>
|
||||
The process of applying these completion specifications when word completion
|
||||
is attempted is described above under <B>Programmable Completion</B>.
|
||||
is attempted is described
|
||||
|
||||
above under <B>Programmable Completion</B>.
|
||||
<P>
|
||||
Other options, if specified, have the following meanings.
|
||||
The arguments to the <B>-G</B>, <B>-W</B>, and <B>-X</B> options
|
||||
@@ -10388,6 +10407,7 @@ Names of all shell variables. May also be specified as <B>-v</B>.
|
||||
<DT><B>-C</B> <I>command</I><DD>
|
||||
<I>command</I> is executed in a subshell environment, and its output is
|
||||
used as the possible completions.
|
||||
Arguments are passed as with the <B>-F</B> option.
|
||||
<DT><B>-F</B> <I>function</I><DD>
|
||||
The shell function <I>function</I> is executed in the current shell
|
||||
environment.
|
||||
@@ -10556,6 +10576,7 @@ to give variables attributes:
|
||||
Each <I>name</I> is an indexed array variable (see
|
||||
<B>Arrays</B>
|
||||
|
||||
|
||||
above).
|
||||
<DT><B>-A</B>
|
||||
|
||||
@@ -10563,6 +10584,7 @@ above).
|
||||
Each <I>name</I> is an associative array variable (see
|
||||
<B>Arrays</B>
|
||||
|
||||
|
||||
above).
|
||||
<DT><B>-f</B>
|
||||
|
||||
@@ -10575,7 +10597,9 @@ The variable is treated as an integer; arithmetic evaluation (see
|
||||
<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
|
||||
|
||||
</FONT>
|
||||
above) is performed when the variable is assigned a value.
|
||||
|
||||
above)
|
||||
is performed when the variable is assigned a value.
|
||||
<DT><B>-l</B>
|
||||
|
||||
<DD>
|
||||
@@ -10650,7 +10674,9 @@ an attempt is made to assign a value to an array variable without
|
||||
using the compound assignment syntax (see
|
||||
<B>Arrays</B>
|
||||
|
||||
above), one of the <I>names</I> is not a valid shell variable name,
|
||||
|
||||
above),
|
||||
one of the <I>names</I> is not a valid shell variable name,
|
||||
an attempt is made to turn off readonly status for a readonly variable,
|
||||
an attempt is made to turn off array status for an array variable,
|
||||
or an attempt is made to display a non-existent function with <B>-f</B>.
|
||||
@@ -11619,6 +11645,7 @@ is an arithmetic expression to be evaluated (see
|
||||
<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
above).
|
||||
If the last
|
||||
<I>arg</I>
|
||||
@@ -11995,7 +12022,10 @@ invalid option is supplied.
|
||||
<DT><B>read</B> [<B>-ers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [<B>-i</B> <I>text</I>] [<B>-n</B> <I>nchars</I>] [<B>-N</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
|
||||
One line is read from the standard input, or from the file descriptor
|
||||
<I>fd</I> supplied as an argument to the <B>-u</B> option,
|
||||
split into words as described above under <B>Word Splitting</B>,
|
||||
split into words as described
|
||||
|
||||
above
|
||||
under <B>Word Splitting</B>,
|
||||
and the first word
|
||||
is assigned to the first
|
||||
<I>name</I>,
|
||||
@@ -12015,7 +12045,10 @@ The characters in
|
||||
|
||||
</FONT>
|
||||
are used to split the line into words using the same rules the shell
|
||||
uses for expansion (described above under <B>Word Splitting</B>).
|
||||
uses for expansion (described
|
||||
|
||||
above
|
||||
under <B>Word Splitting</B>).
|
||||
The backslash character (<B>\</B>) may be used to remove any special
|
||||
meaning for the next character read and for line continuation.
|
||||
Options, if supplied, have the following meanings:
|
||||
@@ -12052,7 +12085,9 @@ is coming from a terminal,
|
||||
<FONT SIZE=-1><B>READLINE</B>
|
||||
|
||||
</FONT>
|
||||
above) is used to obtain the line.
|
||||
|
||||
above)
|
||||
is used to obtain the line.
|
||||
Readline uses the current (or default, if line editing was not previously
|
||||
active) editing settings, but uses Readline's default filename completion.
|
||||
<DT><B>-i </B><I>text</I>
|
||||
@@ -12278,7 +12313,9 @@ or a <I>compound command</I>
|
||||
<FONT SIZE=-1><B>SHELL GRAMMAR</B>
|
||||
|
||||
</FONT>
|
||||
above), exits with a non-zero status.
|
||||
|
||||
above),
|
||||
exits with a non-zero status.
|
||||
The shell does not exit if the
|
||||
command that fails is part of the command list immediately following a
|
||||
<B>while</B>
|
||||
@@ -12314,7 +12351,9 @@ separately (see
|
||||
<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B>
|
||||
|
||||
</FONT>
|
||||
above), and may cause
|
||||
|
||||
above),
|
||||
and may cause
|
||||
subshells to exit before executing all the commands in the subshell.
|
||||
<P>
|
||||
|
||||
@@ -12352,6 +12391,7 @@ it (see
|
||||
<FONT SIZE=-1><B>JOB CONTROL</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
above).
|
||||
All processes run in a separate process group.
|
||||
When a background job completes, the shell prints a line
|
||||
@@ -12423,7 +12463,10 @@ Same as
|
||||
<DT><B>history</B>
|
||||
|
||||
<DD>
|
||||
Enable command history, as described above under
|
||||
Enable command history, as described
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>HISTORY</B>.
|
||||
|
||||
</FONT>
|
||||
@@ -12438,6 +12481,7 @@ had been executed
|
||||
(see
|
||||
<B>Shell Variables</B>
|
||||
|
||||
|
||||
above).
|
||||
<DT><B>keyword</B>
|
||||
|
||||
@@ -12516,7 +12560,9 @@ See
|
||||
<FONT SIZE=-1><B>SEE ALSO</B>
|
||||
|
||||
</FONT>
|
||||
below for a reference to a document that details how posix mode affects
|
||||
|
||||
below
|
||||
for a reference to a document that details how posix mode affects
|
||||
bash's behavior.
|
||||
<DT><B>privileged</B>
|
||||
|
||||
@@ -12637,7 +12683,9 @@ or associated word list.
|
||||
The shell performs brace expansion (see
|
||||
<B>Brace Expansion</B>
|
||||
|
||||
above). This is on by default.
|
||||
|
||||
above).
|
||||
This is on by default.
|
||||
<DT><B>-C</B>
|
||||
|
||||
<DD>
|
||||
@@ -12888,8 +12936,9 @@ intervening command (see
|
||||
<FONT SIZE=-1><B>JOB CONTROL</B>
|
||||
|
||||
</FONT>
|
||||
above). The shell always
|
||||
postpones exiting if any jobs are stopped.
|
||||
|
||||
above).
|
||||
The shell always postpones exiting if any jobs are stopped.
|
||||
<DT><B>checkwinsize</B>
|
||||
|
||||
<DD>
|
||||
@@ -12913,7 +12962,10 @@ attempts to save all lines of a multiple-line
|
||||
command in the same history entry. This allows
|
||||
easy re-editing of multi-line commands.
|
||||
This option is enabled by default, but only has an effect if command
|
||||
history is enabled, as described above under
|
||||
history is enabled, as described
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>HISTORY</B>.
|
||||
|
||||
</FONT>
|
||||
@@ -12948,6 +13000,7 @@ These control aspects of the shell's compatibility mode
|
||||
<FONT SIZE=-1><B>SHELL COMPATIBILITY MODE</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
below).
|
||||
<DT><B>complete_fullquote</B>
|
||||
|
||||
@@ -13024,7 +13077,10 @@ fails.
|
||||
<DT><B>expand_aliases</B>
|
||||
|
||||
<DD>
|
||||
If set, aliases are expanded as described above under
|
||||
If set, aliases are expanded as described
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>ALIASES</B>.
|
||||
|
||||
</FONT>
|
||||
@@ -13067,7 +13123,9 @@ and
|
||||
<FONT SIZE=-1><B>BASH_ARGV</B>
|
||||
|
||||
</FONT>
|
||||
are updated as described in their descriptions above.
|
||||
are updated as described in their descriptions
|
||||
|
||||
above).
|
||||
<DT><B>5.</B>
|
||||
|
||||
<DD>
|
||||
@@ -13085,7 +13143,10 @@ subshells invoked with <B>(</B> <I>command</I> <B>)</B> inherit the
|
||||
<DT><B>extglob</B>
|
||||
|
||||
<DD>
|
||||
If set, the extended pattern matching features described above under
|
||||
If set, the extended pattern matching features described
|
||||
|
||||
above
|
||||
under
|
||||
<B>Pathname Expansion</B> are enabled.
|
||||
<DT><B>extquote</B>
|
||||
|
||||
@@ -13110,7 +13171,9 @@ cause words to be ignored when performing word completion even if
|
||||
the ignored words are the only possible completions.
|
||||
See
|
||||
<FONT SIZE=-1><B>SHELL VARIABLES</B></FONT>
|
||||
above for a description of
|
||||
|
||||
above
|
||||
for a description of
|
||||
<FONT SIZE=-1><B>FIGNORE</B>.
|
||||
|
||||
</FONT>
|
||||
@@ -13122,7 +13185,9 @@ If set, range expressions used in pattern matching bracket expressions (see
|
||||
<FONT SIZE=-1><B>Pattern Matching</B>
|
||||
|
||||
</FONT>
|
||||
above) behave as if in the traditional C locale when performing
|
||||
|
||||
above)
|
||||
behave as if in the traditional C locale when performing
|
||||
comparisons. That is, the current locale's collating sequence
|
||||
is not taken into account, so
|
||||
<B>b</B>
|
||||
@@ -13199,6 +13264,7 @@ under
|
||||
<FONT SIZE=-1><B>READLINE</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
above).
|
||||
This is enabled by default.
|
||||
<DT><B>huponexit</B>
|
||||
@@ -13226,7 +13292,9 @@ line to be ignored in an interactive shell (see
|
||||
<FONT SIZE=-1><B>COMMENTS</B>
|
||||
|
||||
</FONT>
|
||||
above). This option is enabled by default.
|
||||
|
||||
above).
|
||||
This option is enabled by default.
|
||||
<DT><B>lastpipe</B>
|
||||
|
||||
<DD>
|
||||
@@ -13260,6 +13328,7 @@ The shell sets this option if it is started as a login shell (see
|
||||
<FONT SIZE=-1><B>INVOCATION</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
above).
|
||||
The value may not be changed.
|
||||
<DT><B>mailwarn</B>
|
||||
@@ -13293,6 +13362,7 @@ matches filenames in a case-insensitive fashion when performing pathname
|
||||
expansion (see
|
||||
<B>Pathname Expansion</B>
|
||||
|
||||
|
||||
above).
|
||||
<DT><B>nocasematch</B>
|
||||
|
||||
@@ -13323,6 +13393,7 @@ allows patterns which match no
|
||||
files (see
|
||||
<B>Pathname Expansion</B>
|
||||
|
||||
|
||||
above)
|
||||
to expand to a null string, rather than themselves.
|
||||
<DT><B>patsub_replacement</B>
|
||||
@@ -13331,13 +13402,18 @@ to expand to a null string, rather than themselves.
|
||||
If set, <B>bash</B>
|
||||
expands occurrences of <B>&</B> in the replacement string of pattern
|
||||
substitution to the text matched by the pattern, as described
|
||||
under <B>Parameter Expansion</B> above.
|
||||
under <B>Parameter Expansion</B>
|
||||
|
||||
above.
|
||||
This option is enabled by default.
|
||||
<DT><B>progcomp</B>
|
||||
|
||||
<DD>
|
||||
If set, the programmable completion facilities (see
|
||||
<B>Programmable Completion</B> above) are enabled.
|
||||
<B>Programmable Completion</B>
|
||||
|
||||
above)
|
||||
are enabled.
|
||||
This option is enabled by default.
|
||||
<DT><B>progcomp_alias</B>
|
||||
|
||||
@@ -13355,7 +13431,9 @@ expansion, and quote removal after being expanded as described in
|
||||
<FONT SIZE=-1><B>PROMPTING</B>
|
||||
|
||||
</FONT>
|
||||
above. This option is enabled by default.
|
||||
|
||||
above.
|
||||
This option is enabled by default.
|
||||
<DT><B>restricted_shell</B>
|
||||
|
||||
<DD>
|
||||
@@ -13364,6 +13442,7 @@ The shell sets this option if it is started in restricted mode
|
||||
<FONT SIZE=-1><B>RESTRICTED SHELL</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
below).
|
||||
The value may not be changed.
|
||||
This is not reset when the startup files are executed, allowing
|
||||
@@ -13394,7 +13473,9 @@ If set, the shell automatically closes file descriptors assigned using the
|
||||
<FONT SIZE=-1><B>REDIRECTION</B>
|
||||
|
||||
</FONT>
|
||||
above) instead of leaving them open when the command completes.
|
||||
|
||||
above)
|
||||
instead of leaving them open when the command completes.
|
||||
<DT><B>xpg_echo</B>
|
||||
|
||||
<DD>
|
||||
@@ -13428,8 +13509,10 @@ the evaluation of the conditional expression
|
||||
<I>expr</I>.
|
||||
|
||||
Each operator and operand must be a separate argument.
|
||||
Expressions are composed of the primaries described above under
|
||||
Expressions are composed of the primaries described
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>.
|
||||
|
||||
</FONT>
|
||||
@@ -13491,7 +13574,9 @@ The expression is true if and only if the argument is not null.
|
||||
<DT>2 arguments<DD>
|
||||
If the first argument is <B>!</B>, the expression is true if and
|
||||
only if the second argument is null.
|
||||
If the first argument is one of the unary conditional operators listed above
|
||||
If the first argument is one of the unary conditional operators listed
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
|
||||
|
||||
@@ -13501,7 +13586,9 @@ If the first argument is not a valid unary conditional operator, the expression
|
||||
is false.
|
||||
<DT>3 arguments<DD>
|
||||
The following conditions are applied in the order listed.
|
||||
If the second argument is one of the binary conditional operators listed above
|
||||
If the second argument is one of the binary conditional operators listed
|
||||
|
||||
above
|
||||
under
|
||||
<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
|
||||
|
||||
@@ -13631,6 +13718,7 @@ command, and before the first command executes in a shell function (see
|
||||
<FONT SIZE=-1><B>SHELL GRAMMAR</B>
|
||||
|
||||
</FONT>
|
||||
|
||||
above).
|
||||
Refer to the description of the <B>extdebug</B> option to the
|
||||
<B>shopt</B> builtin for details of its effect on the <B>DEBUG</B> trap.
|
||||
@@ -14148,8 +14236,14 @@ its status, instead of returning when it changes status.
|
||||
If
|
||||
<I>id</I>
|
||||
|
||||
specifies a non-existent process or job, the return status is
|
||||
127. Otherwise, the return status is the exit status of the last
|
||||
specifies a non-existent process or job, the return status is 127.
|
||||
If <B>wait</B> is interrupted by a signal, the return status will be greater
|
||||
than 128, as described under
|
||||
<B>SIGNALS</B>
|
||||
|
||||
|
||||
above.
|
||||
Otherwise, the return status is the exit status of the last
|
||||
process or job waited for.
|
||||
</DL>
|
||||
<A NAME="lbDC"> </A>
|
||||
@@ -14177,7 +14271,7 @@ behavior. It's intended to be a temporary solution.
|
||||
This section does not mention behavior that is standard for a particular
|
||||
version (e.g., setting <B>compat32</B> means that quoting the rhs of the regexp
|
||||
matching operator quotes special regexp characters in the word, which is
|
||||
default behavior in bash-3.2 and above).
|
||||
default behavior in bash-3.2 and subsequent versions).
|
||||
<P>
|
||||
|
||||
If a user enables, say, <B>compat32</B>, it may affect the behavior of other
|
||||
@@ -14693,7 +14787,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2022 June 3<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2022 July 29<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -14799,7 +14893,7 @@ There may be only one active coprocess at a time.
|
||||
<DT><A HREF="#lbDI">BUGS</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20220609/doc/bash.1.<BR>
|
||||
Time: 13 June 2022 11:04:39 EDT
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20220811/doc/bash.1.<BR>
|
||||
Time: 12 August 2022 11:28:52 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+192
-172
@@ -1,9 +1,9 @@
|
||||
This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.2, 3 June 2022).
|
||||
Bash shell (version 5.2, 29 July 2022).
|
||||
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Copyright (C) 1988-2022 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.2, 3 June 2022). The Bash home page is
|
||||
Bash shell (version 5.2, 29 July 2022). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -2489,6 +2489,12 @@ the following sub-patterns:
|
||||
'!(PATTERN-LIST)'
|
||||
Matches anything except one of the given patterns.
|
||||
|
||||
The 'extglob' option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make
|
||||
sure that 'extglob' is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
|
||||
When matching filenames, the 'dotglob' shell option determines the
|
||||
set of filenames that are tested: when 'dotglob' is enabled, the set of
|
||||
filenames includes all files beginning with '.', but the filenames '.'
|
||||
@@ -7254,7 +7260,7 @@ startup files.
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
60. The 'printf' builtin uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
@@ -7430,6 +7436,14 @@ required for bash-5.1 and later versions.
|
||||
before any variable-specific transformations have been
|
||||
performed (e.g., converting to lowercase). Bash-5.2 will
|
||||
return the final value assigned to the variable.
|
||||
* Parsing command substitutions will behave as if extended glob
|
||||
(*note The Shopt Builtin::) is enabled, so that parsing a
|
||||
command substitution containing an extglob pattern (say, as
|
||||
part of a shell function) will not fail. This assumes the
|
||||
intent is to enable extglob before the command is executed and
|
||||
word expansions are performed. It will fail at word expansion
|
||||
time if extglob hasn't been enabled by the time the command is
|
||||
executed.
|
||||
|
||||
|
||||
File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
|
||||
@@ -7636,7 +7650,7 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
|
||||
assignment. This is useful only when the '-n' option is supplied.
|
||||
Supplying the '-f' option, when job control is enabled, forces
|
||||
'wait' to wait for each PID or JOBSPEC to terminate before
|
||||
returning its status, intead of returning when it changes status.
|
||||
returning its status, instead of returning when it changes status.
|
||||
If neither JOBSPEC nor PID specifies an active child process of the
|
||||
shell, the return status is 127. If 'wait' is interrupted by a
|
||||
signal, the return status will be greater than 128, as described
|
||||
@@ -8144,7 +8158,9 @@ Variable Settings
|
||||
eighth bit and prefixing an <ESC> character, converting them
|
||||
to a meta-prefixed key sequence. The default value is 'on',
|
||||
but will be set to 'off' if the locale is one that contains
|
||||
eight-bit characters.
|
||||
eight-bit characters. This variable is dependent on the
|
||||
'LC_CTYPE' locale category, and may change if the locale is
|
||||
changed.
|
||||
|
||||
'disable-completion'
|
||||
If set to 'On', Readline will inhibit word completion.
|
||||
@@ -8239,7 +8255,9 @@ Variable Settings
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is 'off', but Readline will set it to 'on' if
|
||||
the locale contains eight-bit characters. The name
|
||||
'meta-flag' is a synonym for this variable.
|
||||
'meta-flag' is a synonym for this variable. This variable is
|
||||
dependent on the 'LC_CTYPE' locale category, and may change if
|
||||
the locale is changed.
|
||||
|
||||
'isearch-terminators'
|
||||
The string of characters that should terminate an incremental
|
||||
@@ -8304,7 +8322,9 @@ Variable Settings
|
||||
If set to 'on', Readline will display characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is 'off', but Readline will set it to
|
||||
'on' if the locale contains eight-bit characters.
|
||||
'on' if the locale contains eight-bit characters. This
|
||||
variable is dependent on the 'LC_CTYPE' locale category, and
|
||||
may change if the locale is changed.
|
||||
|
||||
'page-completions'
|
||||
If set to 'on', Readline uses an internal 'more'-like pager to
|
||||
@@ -8401,7 +8421,7 @@ Key Bindings
|
||||
string that is inserted when the key is pressed (a MACRO).
|
||||
|
||||
The 'bind -p' command displays Readline function names and bindings
|
||||
in a format that can put directly into an initialization file.
|
||||
in a format that can be put directly into an initialization file.
|
||||
*Note Bash Builtins::.
|
||||
|
||||
KEYNAME: FUNCTION-NAME or MACRO
|
||||
@@ -10630,7 +10650,7 @@ the Bash 'configure' recognizes.
|
||||
|
||||
'--with-libintl-prefix[=PREFIX]'
|
||||
Define this to make Bash link with a locally-installed version of
|
||||
the libintl library instead ofthe version in 'lib/intl'.
|
||||
the libintl library instead of the version in 'lib/intl'.
|
||||
|
||||
'--with-libiconv-prefix[=PREFIX]'
|
||||
Define this to make Bash look for libiconv in PREFIX instead of the
|
||||
@@ -11986,27 +12006,27 @@ D.3 Parameter and Variable Index
|
||||
* COPROC: Bash Variables. (line 260)
|
||||
* DIRSTACK: Bash Variables. (line 264)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 146)
|
||||
(line 148)
|
||||
* echo-control-characters: Readline Init File Syntax.
|
||||
(line 151)
|
||||
(line 153)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 156)
|
||||
(line 158)
|
||||
* EMACS: Bash Variables. (line 274)
|
||||
* emacs-mode-string: Readline Init File Syntax.
|
||||
(line 162)
|
||||
(line 164)
|
||||
* enable-active-region: Readline Init File Syntax.
|
||||
(line 172)
|
||||
(line 174)
|
||||
* enable-bracketed-paste: Readline Init File Syntax.
|
||||
(line 185)
|
||||
(line 187)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 194)
|
||||
(line 196)
|
||||
* ENV: Bash Variables. (line 279)
|
||||
* EPOCHREALTIME: Bash Variables. (line 284)
|
||||
* EPOCHSECONDS: Bash Variables. (line 292)
|
||||
* EUID: Bash Variables. (line 299)
|
||||
* EXECIGNORE: Bash Variables. (line 303)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 205)
|
||||
(line 207)
|
||||
* FCEDIT: Bash Variables. (line 316)
|
||||
* FIGNORE: Bash Variables. (line 320)
|
||||
* FUNCNAME: Bash Variables. (line 326)
|
||||
@@ -12020,15 +12040,15 @@ D.3 Parameter and Variable Index
|
||||
* HISTFILESIZE: Bash Variables. (line 402)
|
||||
* HISTIGNORE: Bash Variables. (line 413)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 209)
|
||||
(line 211)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 215)
|
||||
(line 217)
|
||||
* HISTSIZE: Bash Variables. (line 433)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 440)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 224)
|
||||
(line 226)
|
||||
* HOSTFILE: Bash Variables. (line 448)
|
||||
* HOSTNAME: Bash Variables. (line 459)
|
||||
* HOSTTYPE: Bash Variables. (line 462)
|
||||
@@ -12036,13 +12056,13 @@ D.3 Parameter and Variable Index
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 465)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 233)
|
||||
(line 235)
|
||||
* INPUTRC: Bash Variables. (line 475)
|
||||
* INSIDE_EMACS: Bash Variables. (line 479)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 241)
|
||||
(line 245)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 248)
|
||||
(line 252)
|
||||
* LANG: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LANG <1>: Bash Variables. (line 485)
|
||||
@@ -12064,15 +12084,15 @@ D.3 Parameter and Variable Index
|
||||
(line 27)
|
||||
* MAPFILE: Bash Variables. (line 540)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 278)
|
||||
(line 282)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
(line 283)
|
||||
(line 287)
|
||||
* match-hidden-files: Readline Init File Syntax.
|
||||
(line 288)
|
||||
(line 292)
|
||||
* menu-complete-display-prefix: Readline Init File Syntax.
|
||||
(line 295)
|
||||
(line 299)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 233)
|
||||
(line 235)
|
||||
* OLDPWD: Bash Variables. (line 544)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
@@ -12081,9 +12101,9 @@ D.3 Parameter and Variable Index
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 551)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 300)
|
||||
(line 304)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 306)
|
||||
(line 312)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 554)
|
||||
@@ -12106,19 +12126,19 @@ D.3 Parameter and Variable Index
|
||||
* READLINE_POINT: Bash Variables. (line 626)
|
||||
* REPLY: Bash Variables. (line 630)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 316)
|
||||
(line 322)
|
||||
* SECONDS: Bash Variables. (line 633)
|
||||
* SHELL: Bash Variables. (line 642)
|
||||
* SHELLOPTS: Bash Variables. (line 647)
|
||||
* SHLVL: Bash Variables. (line 656)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 322)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
(line 328)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
(line 334)
|
||||
* show-mode-in-prompt: Readline Init File Syntax.
|
||||
(line 337)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 343)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 349)
|
||||
* SRANDOM: Bash Variables. (line 661)
|
||||
* TEXTDOMAIN: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
@@ -12129,11 +12149,11 @@ D.3 Parameter and Variable Index
|
||||
* TMPDIR: Bash Variables. (line 720)
|
||||
* UID: Bash Variables. (line 724)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 356)
|
||||
(line 362)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
(line 367)
|
||||
(line 373)
|
||||
* visible-stats: Readline Init File Syntax.
|
||||
(line 378)
|
||||
(line 384)
|
||||
|
||||
|
||||
File: bash.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes
|
||||
@@ -12512,138 +12532,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top884
|
||||
Node: Introduction2791
|
||||
Node: What is Bash?3004
|
||||
Node: What is a shell?4115
|
||||
Node: Definitions6650
|
||||
Node: Basic Shell Features9598
|
||||
Node: Shell Syntax10814
|
||||
Node: Shell Operation11837
|
||||
Node: Quoting13127
|
||||
Node: Escape Character14428
|
||||
Node: Single Quotes14910
|
||||
Node: Double Quotes15255
|
||||
Node: ANSI-C Quoting16530
|
||||
Node: Locale Translation17837
|
||||
Node: Creating Internationalized Scripts19145
|
||||
Node: Comments23259
|
||||
Node: Shell Commands23874
|
||||
Node: Reserved Words24809
|
||||
Node: Simple Commands25562
|
||||
Node: Pipelines26213
|
||||
Node: Lists29209
|
||||
Node: Compound Commands31001
|
||||
Node: Looping Constructs32010
|
||||
Node: Conditional Constructs34502
|
||||
Node: Command Grouping48987
|
||||
Node: Coprocesses50462
|
||||
Node: GNU Parallel53122
|
||||
Node: Shell Functions54036
|
||||
Node: Shell Parameters61918
|
||||
Node: Positional Parameters66303
|
||||
Node: Special Parameters67202
|
||||
Node: Shell Expansions70413
|
||||
Node: Brace Expansion72537
|
||||
Node: Tilde Expansion75268
|
||||
Node: Shell Parameter Expansion77886
|
||||
Node: Command Substitution96234
|
||||
Node: Arithmetic Expansion97586
|
||||
Node: Process Substitution98551
|
||||
Node: Word Splitting99668
|
||||
Node: Filename Expansion101609
|
||||
Node: Pattern Matching104355
|
||||
Node: Quote Removal109009
|
||||
Node: Redirections109301
|
||||
Node: Executing Commands118958
|
||||
Node: Simple Command Expansion119625
|
||||
Node: Command Search and Execution121732
|
||||
Node: Command Execution Environment124107
|
||||
Node: Environment127139
|
||||
Node: Exit Status128799
|
||||
Node: Signals130580
|
||||
Node: Shell Scripts134026
|
||||
Node: Shell Builtin Commands137050
|
||||
Node: Bourne Shell Builtins139085
|
||||
Node: Bash Builtins160543
|
||||
Node: Modifying Shell Behavior191396
|
||||
Node: The Set Builtin191738
|
||||
Node: The Shopt Builtin202336
|
||||
Node: Special Builtins218245
|
||||
Node: Shell Variables219221
|
||||
Node: Bourne Shell Variables219655
|
||||
Node: Bash Variables221756
|
||||
Node: Bash Features254569
|
||||
Node: Invoking Bash255579
|
||||
Node: Bash Startup Files261589
|
||||
Node: Interactive Shells266717
|
||||
Node: What is an Interactive Shell?267124
|
||||
Node: Is this Shell Interactive?267770
|
||||
Node: Interactive Shell Behavior268582
|
||||
Node: Bash Conditional Expressions272208
|
||||
Node: Shell Arithmetic276847
|
||||
Node: Aliases279788
|
||||
Node: Arrays282398
|
||||
Node: The Directory Stack288786
|
||||
Node: Directory Stack Builtins289567
|
||||
Node: Controlling the Prompt293824
|
||||
Node: The Restricted Shell296786
|
||||
Node: Bash POSIX Mode299393
|
||||
Node: Shell Compatibility Mode311314
|
||||
Node: Job Control319354
|
||||
Node: Job Control Basics319811
|
||||
Node: Job Control Builtins324810
|
||||
Node: Job Control Variables330601
|
||||
Node: Command Line Editing331754
|
||||
Node: Introduction and Notation333422
|
||||
Node: Readline Interaction335042
|
||||
Node: Readline Bare Essentials336230
|
||||
Node: Readline Movement Commands338010
|
||||
Node: Readline Killing Commands338967
|
||||
Node: Readline Arguments340882
|
||||
Node: Searching341923
|
||||
Node: Readline Init File344106
|
||||
Node: Readline Init File Syntax345364
|
||||
Node: Conditional Init Constructs368560
|
||||
Node: Sample Init File372753
|
||||
Node: Bindable Readline Commands375874
|
||||
Node: Commands For Moving377075
|
||||
Node: Commands For History379123
|
||||
Node: Commands For Text384114
|
||||
Node: Commands For Killing387760
|
||||
Node: Numeric Arguments390790
|
||||
Node: Commands For Completion391926
|
||||
Node: Keyboard Macros396114
|
||||
Node: Miscellaneous Commands396798
|
||||
Node: Readline vi Mode402734
|
||||
Node: Programmable Completion403638
|
||||
Node: Programmable Completion Builtins411415
|
||||
Node: A Programmable Completion Example422164
|
||||
Node: Using History Interactively427408
|
||||
Node: Bash History Facilities428089
|
||||
Node: Bash History Builtins431091
|
||||
Node: History Interaction436096
|
||||
Node: Event Designators439713
|
||||
Node: Word Designators441064
|
||||
Node: Modifiers442821
|
||||
Node: Installing Bash444629
|
||||
Node: Basic Installation445763
|
||||
Node: Compilers and Options449482
|
||||
Node: Compiling For Multiple Architectures450220
|
||||
Node: Installation Names451910
|
||||
Node: Specifying the System Type454016
|
||||
Node: Sharing Defaults454729
|
||||
Node: Operation Controls455399
|
||||
Node: Optional Features456354
|
||||
Node: Reporting Bugs467569
|
||||
Node: Major Differences From The Bourne Shell468841
|
||||
Node: GNU Free Documentation License485688
|
||||
Node: Indexes510862
|
||||
Node: Builtin Index511313
|
||||
Node: Reserved Word Index518137
|
||||
Node: Variable Index520582
|
||||
Node: Function Index537353
|
||||
Node: Concept Index551134
|
||||
Node: Top886
|
||||
Node: Introduction2795
|
||||
Node: What is Bash?3008
|
||||
Node: What is a shell?4119
|
||||
Node: Definitions6654
|
||||
Node: Basic Shell Features9602
|
||||
Node: Shell Syntax10818
|
||||
Node: Shell Operation11841
|
||||
Node: Quoting13131
|
||||
Node: Escape Character14432
|
||||
Node: Single Quotes14914
|
||||
Node: Double Quotes15259
|
||||
Node: ANSI-C Quoting16534
|
||||
Node: Locale Translation17841
|
||||
Node: Creating Internationalized Scripts19149
|
||||
Node: Comments23263
|
||||
Node: Shell Commands23878
|
||||
Node: Reserved Words24813
|
||||
Node: Simple Commands25566
|
||||
Node: Pipelines26217
|
||||
Node: Lists29213
|
||||
Node: Compound Commands31005
|
||||
Node: Looping Constructs32014
|
||||
Node: Conditional Constructs34506
|
||||
Node: Command Grouping48991
|
||||
Node: Coprocesses50466
|
||||
Node: GNU Parallel53126
|
||||
Node: Shell Functions54040
|
||||
Node: Shell Parameters61922
|
||||
Node: Positional Parameters66307
|
||||
Node: Special Parameters67206
|
||||
Node: Shell Expansions70417
|
||||
Node: Brace Expansion72541
|
||||
Node: Tilde Expansion75272
|
||||
Node: Shell Parameter Expansion77890
|
||||
Node: Command Substitution96238
|
||||
Node: Arithmetic Expansion97590
|
||||
Node: Process Substitution98555
|
||||
Node: Word Splitting99672
|
||||
Node: Filename Expansion101613
|
||||
Node: Pattern Matching104359
|
||||
Node: Quote Removal109358
|
||||
Node: Redirections109650
|
||||
Node: Executing Commands119307
|
||||
Node: Simple Command Expansion119974
|
||||
Node: Command Search and Execution122081
|
||||
Node: Command Execution Environment124456
|
||||
Node: Environment127488
|
||||
Node: Exit Status129148
|
||||
Node: Signals130929
|
||||
Node: Shell Scripts134375
|
||||
Node: Shell Builtin Commands137399
|
||||
Node: Bourne Shell Builtins139434
|
||||
Node: Bash Builtins160892
|
||||
Node: Modifying Shell Behavior191745
|
||||
Node: The Set Builtin192087
|
||||
Node: The Shopt Builtin202685
|
||||
Node: Special Builtins218594
|
||||
Node: Shell Variables219570
|
||||
Node: Bourne Shell Variables220004
|
||||
Node: Bash Variables222105
|
||||
Node: Bash Features254918
|
||||
Node: Invoking Bash255928
|
||||
Node: Bash Startup Files261938
|
||||
Node: Interactive Shells267066
|
||||
Node: What is an Interactive Shell?267473
|
||||
Node: Is this Shell Interactive?268119
|
||||
Node: Interactive Shell Behavior268931
|
||||
Node: Bash Conditional Expressions272557
|
||||
Node: Shell Arithmetic277196
|
||||
Node: Aliases280137
|
||||
Node: Arrays282747
|
||||
Node: The Directory Stack289135
|
||||
Node: Directory Stack Builtins289916
|
||||
Node: Controlling the Prompt294173
|
||||
Node: The Restricted Shell297135
|
||||
Node: Bash POSIX Mode299742
|
||||
Node: Shell Compatibility Mode311662
|
||||
Node: Job Control320220
|
||||
Node: Job Control Basics320677
|
||||
Node: Job Control Builtins325676
|
||||
Node: Job Control Variables331468
|
||||
Node: Command Line Editing332621
|
||||
Node: Introduction and Notation334289
|
||||
Node: Readline Interaction335909
|
||||
Node: Readline Bare Essentials337097
|
||||
Node: Readline Movement Commands338877
|
||||
Node: Readline Killing Commands339834
|
||||
Node: Readline Arguments341749
|
||||
Node: Searching342790
|
||||
Node: Readline Init File344973
|
||||
Node: Readline Init File Syntax346231
|
||||
Node: Conditional Init Constructs369802
|
||||
Node: Sample Init File373995
|
||||
Node: Bindable Readline Commands377116
|
||||
Node: Commands For Moving378317
|
||||
Node: Commands For History380365
|
||||
Node: Commands For Text385356
|
||||
Node: Commands For Killing389002
|
||||
Node: Numeric Arguments392032
|
||||
Node: Commands For Completion393168
|
||||
Node: Keyboard Macros397356
|
||||
Node: Miscellaneous Commands398040
|
||||
Node: Readline vi Mode403976
|
||||
Node: Programmable Completion404880
|
||||
Node: Programmable Completion Builtins412657
|
||||
Node: A Programmable Completion Example423406
|
||||
Node: Using History Interactively428650
|
||||
Node: Bash History Facilities429331
|
||||
Node: Bash History Builtins432333
|
||||
Node: History Interaction437338
|
||||
Node: Event Designators440955
|
||||
Node: Word Designators442306
|
||||
Node: Modifiers444063
|
||||
Node: Installing Bash445871
|
||||
Node: Basic Installation447005
|
||||
Node: Compilers and Options450724
|
||||
Node: Compiling For Multiple Architectures451462
|
||||
Node: Installation Names453152
|
||||
Node: Specifying the System Type455258
|
||||
Node: Sharing Defaults455971
|
||||
Node: Operation Controls456641
|
||||
Node: Optional Features457596
|
||||
Node: Reporting Bugs468812
|
||||
Node: Major Differences From The Bourne Shell470084
|
||||
Node: GNU Free Documentation License486931
|
||||
Node: Indexes512105
|
||||
Node: Builtin Index512556
|
||||
Node: Reserved Word Index519380
|
||||
Node: Variable Index521825
|
||||
Node: Function Index538596
|
||||
Node: Concept Index552377
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+4836
-4814
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+40
-14
@@ -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.2, 3 June 2022).
|
||||
the Bash shell (version 5.2, 29 July 2022).
|
||||
|
||||
This is Edition 5.2, last updated 3 June 2022,
|
||||
This is Edition 5.2, last updated 29 July 2022,
|
||||
of The GNU Bash Reference Manual,
|
||||
for Bash, Version 5.2.
|
||||
|
||||
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
|
||||
<span id="Bash-Features-1"></span><h1 class="top">Bash Features</h1>
|
||||
|
||||
<p>This text is a brief description of the features that are present in
|
||||
the Bash shell (version 5.2, 3 June 2022).
|
||||
the Bash shell (version 5.2, 29 July 2022).
|
||||
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
|
||||
</p>
|
||||
<p>This is Edition 5.2, last updated 3 June 2022,
|
||||
<p>This is Edition 5.2, last updated 29 July 2022,
|
||||
of <cite>The GNU Bash Reference Manual</cite>,
|
||||
for <code>Bash</code>, Version 5.2.
|
||||
</p>
|
||||
@@ -1418,16 +1418,16 @@ It has almost the same syntax as the <code>for</code> command:
|
||||
</pre></div>
|
||||
|
||||
<p>The list of words following <code>in</code> is expanded, generating a list
|
||||
of items. The set of expanded words is printed on the standard
|
||||
of items, and the set of expanded words is printed on the standard
|
||||
error output stream, each preceded by a number. If the
|
||||
‘<samp>in <var>words</var></samp>’ is omitted, the positional parameters are printed,
|
||||
as if ‘<samp>in "$@"</samp>’ had been specified.
|
||||
The <code>PS3</code> prompt is then displayed and a line is read from the
|
||||
standard input.
|
||||
<code>select</code> then displays the <code>PS3</code>
|
||||
prompt and reads a line from the standard input.
|
||||
If the line consists of a number corresponding to one of the displayed
|
||||
words, then the value of <var>name</var> is set to that word.
|
||||
If the line is empty, the words and prompt are displayed again.
|
||||
If <code>EOF</code> is read, the <code>select</code> command completes.
|
||||
If <code>EOF</code> is read, the <code>select</code> command completes and returns 1.
|
||||
Any other value read causes <var>name</var> to be set to null.
|
||||
The line read is saved in the variable <code>REPLY</code>.
|
||||
</p>
|
||||
@@ -3382,6 +3382,12 @@ sub-patterns:
|
||||
</p></dd>
|
||||
</dl>
|
||||
|
||||
<p>The <code>extglob</code> option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make sure
|
||||
that <code>extglob</code> is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
</p>
|
||||
<p>When matching filenames, the <code>dotglob</code> shell option determines
|
||||
the set of filenames that are tested:
|
||||
when <code>dotglob</code> is enabled, the set of filenames includes all files
|
||||
@@ -9358,7 +9364,7 @@ has been set.
|
||||
If Bash receives a trapped signal while executing <code>read</code>, the trap
|
||||
handler executes and <code>read</code> returns an exit status greater than 128.
|
||||
|
||||
</li><li> The <code>printf</code> builting uses <code>double</code> (via <code>strtod</code>) to convert
|
||||
</li><li> The <code>printf</code> builtin uses <code>double</code> (via <code>strtod</code>) to convert
|
||||
arguments corresponding to floating point conversion specifiers, instead of
|
||||
<code>long double</code> if it’s available. The ‘<samp>L</samp>’ length modifier forces
|
||||
<code>printf</code> to use <code>long double</code> if it’s available.
|
||||
@@ -9414,7 +9420,7 @@ behavior. It’s intended to be a temporary solution.
|
||||
<p>This section does not mention behavior that is standard for a particular
|
||||
version (e.g., setting <code>compat32</code> means that quoting the rhs of the regexp
|
||||
matching operator quotes special regexp characters in the word, which is
|
||||
default behavior in bash-3.2 and above).
|
||||
default behavior in bash-3.2 and subsequent versions).
|
||||
</p>
|
||||
<p>If a user enables, say, <code>compat32</code>, it may affect the behavior of other
|
||||
compatibility levels up to and including the current compatibility level.
|
||||
@@ -9577,6 +9583,14 @@ Bash-5.2 will look for and report on a key named ‘<samp>@</samp>’
|
||||
<var>value</var>, before any variable-specific transformations have been
|
||||
performed (e.g., converting to lowercase).
|
||||
Bash-5.2 will return the final value assigned to the variable.
|
||||
</li><li> Parsing command substitutions will behave as if extended glob
|
||||
(see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>)
|
||||
is enabled, so that parsing a command substitution containing an extglob
|
||||
pattern (say, as part of a shell function) will not fail.
|
||||
This assumes the intent is to enable extglob before the command is executed
|
||||
and word expansions are performed.
|
||||
It will fail at word expansion time if extglob hasn’t been
|
||||
enabled by the time the command is executed.
|
||||
</li></ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -9846,10 +9860,14 @@ The variable will be unset initially, before any assignment.
|
||||
This is useful only when the <samp>-n</samp> option is supplied.
|
||||
Supplying the <samp>-f</samp> option, when job control is enabled,
|
||||
forces <code>wait</code> to wait for each <var>pid</var> or <var>jobspec</var> to
|
||||
terminate before returning its status, intead of returning when it changes
|
||||
terminate before returning its status, instead of returning when it changes
|
||||
status.
|
||||
If neither <var>jobspec</var> nor <var>pid</var> specifies an active child process
|
||||
of the shell, the return status is 127.
|
||||
If <code>wait</code> is interrupted by a signal, the return status will be greater
|
||||
than 128, as described above (see <a href="#Signals">Signals</a>).
|
||||
Otherwise, the return status is the exit status
|
||||
of the last process or job waited for.
|
||||
</p>
|
||||
</dd>
|
||||
<dt id='index-disown'><span><code>disown</code><a href='#index-disown' class='copiable-anchor'> ¶</a></span></dt>
|
||||
@@ -10476,9 +10494,12 @@ The default limit is <code>100</code>.
|
||||
<dd><p>If set to ‘<samp>on</samp>’, Readline will convert characters with the
|
||||
eighth bit set to an <small>ASCII</small> key sequence by stripping the eighth
|
||||
bit and prefixing an <tt class="key">ESC</tt> character, converting them to a
|
||||
meta-prefixed key sequence. The default value is ‘<samp>on</samp>’, but
|
||||
meta-prefixed key sequence.
|
||||
The default value is ‘<samp>on</samp>’, but
|
||||
will be set to ‘<samp>off</samp>’ if the locale is one that contains
|
||||
eight-bit characters.
|
||||
This variable is dependent on the <code>LC_CTYPE</code> locale category, and
|
||||
may change if the locale is changed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt id='index-disable_002dcompletion'><span><code>disable-completion</code><a href='#index-disable_002dcompletion' class='copiable-anchor'> ¶</a></span></dt>
|
||||
@@ -10590,6 +10611,8 @@ regardless of what the terminal claims it can support. The
|
||||
default value is ‘<samp>off</samp>’, but Readline will set it to ‘<samp>on</samp>’ if the
|
||||
locale contains eight-bit characters.
|
||||
The name <code>meta-flag</code> is a synonym for this variable.
|
||||
This variable is dependent on the <code>LC_CTYPE</code> locale category, and
|
||||
may change if the locale is changed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt id='index-isearch_002dterminators'><span><code>isearch-terminators</code><a href='#index-isearch_002dterminators' class='copiable-anchor'> ¶</a></span></dt>
|
||||
@@ -10674,6 +10697,8 @@ eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is ‘<samp>off</samp>’, but Readline will set it to ‘<samp>on</samp>’ if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the <code>LC_CTYPE</code> locale category, and
|
||||
may change if the locale is changed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt id='index-page_002dcompletions'><span><code>page-completions</code><a href='#index-page_002dcompletions' class='copiable-anchor'> ¶</a></span></dt>
|
||||
@@ -10790,7 +10815,7 @@ what you find most comfortable.
|
||||
to a string that is inserted when the key is pressed (a <var>macro</var>).
|
||||
</p>
|
||||
<p>The <code>bind <span class="nolinebreak">-p</span></code><!-- /@w --> command displays Readline function names and
|
||||
bindings in a format that can put directly into an initialization file.
|
||||
bindings in a format that can be put directly into an initialization file.
|
||||
See <a href="#Bash-Builtins">Bash Builtin Commands</a>.
|
||||
</p>
|
||||
<dl compact="compact">
|
||||
@@ -12425,6 +12450,7 @@ completions:
|
||||
<dt><span><code>-C <var>command</var></code></span></dt>
|
||||
<dd><p><var>command</var> is executed in a subshell environment, and its output is
|
||||
used as the possible completions.
|
||||
Arguments are passed as with the <samp>-F</samp> option.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span><code>-F <var>function</var></code></span></dt>
|
||||
@@ -13588,7 +13614,7 @@ the installed version of Readline in subdirectories of that directory
|
||||
</dd>
|
||||
<dt><span><code>--with-libintl-prefix[=<var>PREFIX</var>]</code></span></dt>
|
||||
<dd><p>Define this to make Bash link with a locally-installed version of the
|
||||
libintl library instead ofthe version in <samp>lib/intl</samp>.
|
||||
libintl library instead of the version in <samp>lib/intl</samp>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span><code>--with-libiconv-prefix[=<var>PREFIX</var>]</code></span></dt>
|
||||
|
||||
+192
-172
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.2, 3 June 2022).
|
||||
Bash shell (version 5.2, 29 July 2022).
|
||||
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Copyright (C) 1988-2022 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.2, 3 June 2022). The Bash home page is
|
||||
Bash shell (version 5.2, 29 July 2022). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 29 July 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -2490,6 +2490,12 @@ the following sub-patterns:
|
||||
'!(PATTERN-LIST)'
|
||||
Matches anything except one of the given patterns.
|
||||
|
||||
The 'extglob' option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make
|
||||
sure that 'extglob' is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
|
||||
When matching filenames, the 'dotglob' shell option determines the
|
||||
set of filenames that are tested: when 'dotglob' is enabled, the set of
|
||||
filenames includes all files beginning with '.', but the filenames '.'
|
||||
@@ -7255,7 +7261,7 @@ startup files.
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
60. The 'printf' builtin uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
@@ -7431,6 +7437,14 @@ required for bash-5.1 and later versions.
|
||||
before any variable-specific transformations have been
|
||||
performed (e.g., converting to lowercase). Bash-5.2 will
|
||||
return the final value assigned to the variable.
|
||||
* Parsing command substitutions will behave as if extended glob
|
||||
(*note The Shopt Builtin::) is enabled, so that parsing a
|
||||
command substitution containing an extglob pattern (say, as
|
||||
part of a shell function) will not fail. This assumes the
|
||||
intent is to enable extglob before the command is executed and
|
||||
word expansions are performed. It will fail at word expansion
|
||||
time if extglob hasn't been enabled by the time the command is
|
||||
executed.
|
||||
|
||||
|
||||
File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
|
||||
@@ -7637,7 +7651,7 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
|
||||
assignment. This is useful only when the '-n' option is supplied.
|
||||
Supplying the '-f' option, when job control is enabled, forces
|
||||
'wait' to wait for each PID or JOBSPEC to terminate before
|
||||
returning its status, intead of returning when it changes status.
|
||||
returning its status, instead of returning when it changes status.
|
||||
If neither JOBSPEC nor PID specifies an active child process of the
|
||||
shell, the return status is 127. If 'wait' is interrupted by a
|
||||
signal, the return status will be greater than 128, as described
|
||||
@@ -8145,7 +8159,9 @@ Variable Settings
|
||||
eighth bit and prefixing an <ESC> character, converting them
|
||||
to a meta-prefixed key sequence. The default value is 'on',
|
||||
but will be set to 'off' if the locale is one that contains
|
||||
eight-bit characters.
|
||||
eight-bit characters. This variable is dependent on the
|
||||
'LC_CTYPE' locale category, and may change if the locale is
|
||||
changed.
|
||||
|
||||
'disable-completion'
|
||||
If set to 'On', Readline will inhibit word completion.
|
||||
@@ -8240,7 +8256,9 @@ Variable Settings
|
||||
regardless of what the terminal claims it can support. The
|
||||
default value is 'off', but Readline will set it to 'on' if
|
||||
the locale contains eight-bit characters. The name
|
||||
'meta-flag' is a synonym for this variable.
|
||||
'meta-flag' is a synonym for this variable. This variable is
|
||||
dependent on the 'LC_CTYPE' locale category, and may change if
|
||||
the locale is changed.
|
||||
|
||||
'isearch-terminators'
|
||||
The string of characters that should terminate an incremental
|
||||
@@ -8305,7 +8323,9 @@ Variable Settings
|
||||
If set to 'on', Readline will display characters with the
|
||||
eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence. The default is 'off', but Readline will set it to
|
||||
'on' if the locale contains eight-bit characters.
|
||||
'on' if the locale contains eight-bit characters. This
|
||||
variable is dependent on the 'LC_CTYPE' locale category, and
|
||||
may change if the locale is changed.
|
||||
|
||||
'page-completions'
|
||||
If set to 'on', Readline uses an internal 'more'-like pager to
|
||||
@@ -8402,7 +8422,7 @@ Key Bindings
|
||||
string that is inserted when the key is pressed (a MACRO).
|
||||
|
||||
The 'bind -p' command displays Readline function names and bindings
|
||||
in a format that can put directly into an initialization file.
|
||||
in a format that can be put directly into an initialization file.
|
||||
*Note Bash Builtins::.
|
||||
|
||||
KEYNAME: FUNCTION-NAME or MACRO
|
||||
@@ -10631,7 +10651,7 @@ the Bash 'configure' recognizes.
|
||||
|
||||
'--with-libintl-prefix[=PREFIX]'
|
||||
Define this to make Bash link with a locally-installed version of
|
||||
the libintl library instead ofthe version in 'lib/intl'.
|
||||
the libintl library instead of the version in 'lib/intl'.
|
||||
|
||||
'--with-libiconv-prefix[=PREFIX]'
|
||||
Define this to make Bash look for libiconv in PREFIX instead of the
|
||||
@@ -11987,27 +12007,27 @@ D.3 Parameter and Variable Index
|
||||
* COPROC: Bash Variables. (line 260)
|
||||
* DIRSTACK: Bash Variables. (line 264)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 146)
|
||||
(line 148)
|
||||
* echo-control-characters: Readline Init File Syntax.
|
||||
(line 151)
|
||||
(line 153)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 156)
|
||||
(line 158)
|
||||
* EMACS: Bash Variables. (line 274)
|
||||
* emacs-mode-string: Readline Init File Syntax.
|
||||
(line 162)
|
||||
(line 164)
|
||||
* enable-active-region: Readline Init File Syntax.
|
||||
(line 172)
|
||||
(line 174)
|
||||
* enable-bracketed-paste: Readline Init File Syntax.
|
||||
(line 185)
|
||||
(line 187)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 194)
|
||||
(line 196)
|
||||
* ENV: Bash Variables. (line 279)
|
||||
* EPOCHREALTIME: Bash Variables. (line 284)
|
||||
* EPOCHSECONDS: Bash Variables. (line 292)
|
||||
* EUID: Bash Variables. (line 299)
|
||||
* EXECIGNORE: Bash Variables. (line 303)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 205)
|
||||
(line 207)
|
||||
* FCEDIT: Bash Variables. (line 316)
|
||||
* FIGNORE: Bash Variables. (line 320)
|
||||
* FUNCNAME: Bash Variables. (line 326)
|
||||
@@ -12021,15 +12041,15 @@ D.3 Parameter and Variable Index
|
||||
* HISTFILESIZE: Bash Variables. (line 402)
|
||||
* HISTIGNORE: Bash Variables. (line 413)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 209)
|
||||
(line 211)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 215)
|
||||
(line 217)
|
||||
* HISTSIZE: Bash Variables. (line 433)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 440)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 224)
|
||||
(line 226)
|
||||
* HOSTFILE: Bash Variables. (line 448)
|
||||
* HOSTNAME: Bash Variables. (line 459)
|
||||
* HOSTTYPE: Bash Variables. (line 462)
|
||||
@@ -12037,13 +12057,13 @@ D.3 Parameter and Variable Index
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 465)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 233)
|
||||
(line 235)
|
||||
* INPUTRC: Bash Variables. (line 475)
|
||||
* INSIDE_EMACS: Bash Variables. (line 479)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 241)
|
||||
(line 245)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 248)
|
||||
(line 252)
|
||||
* LANG: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
* LANG <1>: Bash Variables. (line 485)
|
||||
@@ -12065,15 +12085,15 @@ D.3 Parameter and Variable Index
|
||||
(line 27)
|
||||
* MAPFILE: Bash Variables. (line 540)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 278)
|
||||
(line 282)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
(line 283)
|
||||
(line 287)
|
||||
* match-hidden-files: Readline Init File Syntax.
|
||||
(line 288)
|
||||
(line 292)
|
||||
* menu-complete-display-prefix: Readline Init File Syntax.
|
||||
(line 295)
|
||||
(line 299)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 233)
|
||||
(line 235)
|
||||
* OLDPWD: Bash Variables. (line 544)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
@@ -12082,9 +12102,9 @@ D.3 Parameter and Variable Index
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 551)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 300)
|
||||
(line 304)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 306)
|
||||
(line 312)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 554)
|
||||
@@ -12107,19 +12127,19 @@ D.3 Parameter and Variable Index
|
||||
* READLINE_POINT: Bash Variables. (line 626)
|
||||
* REPLY: Bash Variables. (line 630)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 316)
|
||||
(line 322)
|
||||
* SECONDS: Bash Variables. (line 633)
|
||||
* SHELL: Bash Variables. (line 642)
|
||||
* SHELLOPTS: Bash Variables. (line 647)
|
||||
* SHLVL: Bash Variables. (line 656)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 322)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
(line 328)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
(line 334)
|
||||
* show-mode-in-prompt: Readline Init File Syntax.
|
||||
(line 337)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 343)
|
||||
* skip-completed-text: Readline Init File Syntax.
|
||||
(line 349)
|
||||
* SRANDOM: Bash Variables. (line 661)
|
||||
* TEXTDOMAIN: Creating Internationalized Scripts.
|
||||
(line 51)
|
||||
@@ -12130,11 +12150,11 @@ D.3 Parameter and Variable Index
|
||||
* TMPDIR: Bash Variables. (line 720)
|
||||
* UID: Bash Variables. (line 724)
|
||||
* vi-cmd-mode-string: Readline Init File Syntax.
|
||||
(line 356)
|
||||
(line 362)
|
||||
* vi-ins-mode-string: Readline Init File Syntax.
|
||||
(line 367)
|
||||
(line 373)
|
||||
* visible-stats: Readline Init File Syntax.
|
||||
(line 378)
|
||||
(line 384)
|
||||
|
||||
|
||||
File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes
|
||||
@@ -12513,138 +12533,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top887
|
||||
Node: Introduction2797
|
||||
Node: What is Bash?3013
|
||||
Node: What is a shell?4127
|
||||
Node: Definitions6665
|
||||
Node: Basic Shell Features9616
|
||||
Node: Shell Syntax10835
|
||||
Node: Shell Operation11861
|
||||
Node: Quoting13154
|
||||
Node: Escape Character14458
|
||||
Node: Single Quotes14943
|
||||
Node: Double Quotes15291
|
||||
Node: ANSI-C Quoting16569
|
||||
Node: Locale Translation17879
|
||||
Node: Creating Internationalized Scripts19190
|
||||
Node: Comments23307
|
||||
Node: Shell Commands23925
|
||||
Node: Reserved Words24863
|
||||
Node: Simple Commands25619
|
||||
Node: Pipelines26273
|
||||
Node: Lists29272
|
||||
Node: Compound Commands31067
|
||||
Node: Looping Constructs32079
|
||||
Node: Conditional Constructs34574
|
||||
Node: Command Grouping49062
|
||||
Node: Coprocesses50540
|
||||
Node: GNU Parallel53203
|
||||
Node: Shell Functions54120
|
||||
Node: Shell Parameters62005
|
||||
Node: Positional Parameters66393
|
||||
Node: Special Parameters67295
|
||||
Node: Shell Expansions70509
|
||||
Node: Brace Expansion72636
|
||||
Node: Tilde Expansion75370
|
||||
Node: Shell Parameter Expansion77991
|
||||
Node: Command Substitution96342
|
||||
Node: Arithmetic Expansion97697
|
||||
Node: Process Substitution98665
|
||||
Node: Word Splitting99785
|
||||
Node: Filename Expansion101729
|
||||
Node: Pattern Matching104478
|
||||
Node: Quote Removal109135
|
||||
Node: Redirections109430
|
||||
Node: Executing Commands119090
|
||||
Node: Simple Command Expansion119760
|
||||
Node: Command Search and Execution121870
|
||||
Node: Command Execution Environment124248
|
||||
Node: Environment127283
|
||||
Node: Exit Status128946
|
||||
Node: Signals130730
|
||||
Node: Shell Scripts134179
|
||||
Node: Shell Builtin Commands137206
|
||||
Node: Bourne Shell Builtins139244
|
||||
Node: Bash Builtins160705
|
||||
Node: Modifying Shell Behavior191561
|
||||
Node: The Set Builtin191906
|
||||
Node: The Shopt Builtin202507
|
||||
Node: Special Builtins218419
|
||||
Node: Shell Variables219398
|
||||
Node: Bourne Shell Variables219835
|
||||
Node: Bash Variables221939
|
||||
Node: Bash Features254755
|
||||
Node: Invoking Bash255768
|
||||
Node: Bash Startup Files261781
|
||||
Node: Interactive Shells266912
|
||||
Node: What is an Interactive Shell?267322
|
||||
Node: Is this Shell Interactive?267971
|
||||
Node: Interactive Shell Behavior268786
|
||||
Node: Bash Conditional Expressions272415
|
||||
Node: Shell Arithmetic277057
|
||||
Node: Aliases280001
|
||||
Node: Arrays282614
|
||||
Node: The Directory Stack289005
|
||||
Node: Directory Stack Builtins289789
|
||||
Node: Controlling the Prompt294049
|
||||
Node: The Restricted Shell297014
|
||||
Node: Bash POSIX Mode299624
|
||||
Node: Shell Compatibility Mode311548
|
||||
Node: Job Control319591
|
||||
Node: Job Control Basics320051
|
||||
Node: Job Control Builtins325053
|
||||
Node: Job Control Variables330847
|
||||
Node: Command Line Editing332003
|
||||
Node: Introduction and Notation333674
|
||||
Node: Readline Interaction335297
|
||||
Node: Readline Bare Essentials336488
|
||||
Node: Readline Movement Commands338271
|
||||
Node: Readline Killing Commands339231
|
||||
Node: Readline Arguments341149
|
||||
Node: Searching342193
|
||||
Node: Readline Init File344379
|
||||
Node: Readline Init File Syntax345640
|
||||
Node: Conditional Init Constructs368839
|
||||
Node: Sample Init File373035
|
||||
Node: Bindable Readline Commands376159
|
||||
Node: Commands For Moving377363
|
||||
Node: Commands For History379414
|
||||
Node: Commands For Text384408
|
||||
Node: Commands For Killing388057
|
||||
Node: Numeric Arguments391090
|
||||
Node: Commands For Completion392229
|
||||
Node: Keyboard Macros396420
|
||||
Node: Miscellaneous Commands397107
|
||||
Node: Readline vi Mode403046
|
||||
Node: Programmable Completion403953
|
||||
Node: Programmable Completion Builtins411733
|
||||
Node: A Programmable Completion Example422485
|
||||
Node: Using History Interactively427732
|
||||
Node: Bash History Facilities428416
|
||||
Node: Bash History Builtins431421
|
||||
Node: History Interaction436429
|
||||
Node: Event Designators440049
|
||||
Node: Word Designators441403
|
||||
Node: Modifiers443163
|
||||
Node: Installing Bash444974
|
||||
Node: Basic Installation446111
|
||||
Node: Compilers and Options449833
|
||||
Node: Compiling For Multiple Architectures450574
|
||||
Node: Installation Names452267
|
||||
Node: Specifying the System Type454376
|
||||
Node: Sharing Defaults455092
|
||||
Node: Operation Controls455765
|
||||
Node: Optional Features456723
|
||||
Node: Reporting Bugs467941
|
||||
Node: Major Differences From The Bourne Shell469216
|
||||
Node: GNU Free Documentation License486066
|
||||
Node: Indexes511243
|
||||
Node: Builtin Index511697
|
||||
Node: Reserved Word Index518524
|
||||
Node: Variable Index520972
|
||||
Node: Function Index537746
|
||||
Node: Concept Index551530
|
||||
Node: Top889
|
||||
Node: Introduction2801
|
||||
Node: What is Bash?3017
|
||||
Node: What is a shell?4131
|
||||
Node: Definitions6669
|
||||
Node: Basic Shell Features9620
|
||||
Node: Shell Syntax10839
|
||||
Node: Shell Operation11865
|
||||
Node: Quoting13158
|
||||
Node: Escape Character14462
|
||||
Node: Single Quotes14947
|
||||
Node: Double Quotes15295
|
||||
Node: ANSI-C Quoting16573
|
||||
Node: Locale Translation17883
|
||||
Node: Creating Internationalized Scripts19194
|
||||
Node: Comments23311
|
||||
Node: Shell Commands23929
|
||||
Node: Reserved Words24867
|
||||
Node: Simple Commands25623
|
||||
Node: Pipelines26277
|
||||
Node: Lists29276
|
||||
Node: Compound Commands31071
|
||||
Node: Looping Constructs32083
|
||||
Node: Conditional Constructs34578
|
||||
Node: Command Grouping49066
|
||||
Node: Coprocesses50544
|
||||
Node: GNU Parallel53207
|
||||
Node: Shell Functions54124
|
||||
Node: Shell Parameters62009
|
||||
Node: Positional Parameters66397
|
||||
Node: Special Parameters67299
|
||||
Node: Shell Expansions70513
|
||||
Node: Brace Expansion72640
|
||||
Node: Tilde Expansion75374
|
||||
Node: Shell Parameter Expansion77995
|
||||
Node: Command Substitution96346
|
||||
Node: Arithmetic Expansion97701
|
||||
Node: Process Substitution98669
|
||||
Node: Word Splitting99789
|
||||
Node: Filename Expansion101733
|
||||
Node: Pattern Matching104482
|
||||
Node: Quote Removal109484
|
||||
Node: Redirections109779
|
||||
Node: Executing Commands119439
|
||||
Node: Simple Command Expansion120109
|
||||
Node: Command Search and Execution122219
|
||||
Node: Command Execution Environment124597
|
||||
Node: Environment127632
|
||||
Node: Exit Status129295
|
||||
Node: Signals131079
|
||||
Node: Shell Scripts134528
|
||||
Node: Shell Builtin Commands137555
|
||||
Node: Bourne Shell Builtins139593
|
||||
Node: Bash Builtins161054
|
||||
Node: Modifying Shell Behavior191910
|
||||
Node: The Set Builtin192255
|
||||
Node: The Shopt Builtin202856
|
||||
Node: Special Builtins218768
|
||||
Node: Shell Variables219747
|
||||
Node: Bourne Shell Variables220184
|
||||
Node: Bash Variables222288
|
||||
Node: Bash Features255104
|
||||
Node: Invoking Bash256117
|
||||
Node: Bash Startup Files262130
|
||||
Node: Interactive Shells267261
|
||||
Node: What is an Interactive Shell?267671
|
||||
Node: Is this Shell Interactive?268320
|
||||
Node: Interactive Shell Behavior269135
|
||||
Node: Bash Conditional Expressions272764
|
||||
Node: Shell Arithmetic277406
|
||||
Node: Aliases280350
|
||||
Node: Arrays282963
|
||||
Node: The Directory Stack289354
|
||||
Node: Directory Stack Builtins290138
|
||||
Node: Controlling the Prompt294398
|
||||
Node: The Restricted Shell297363
|
||||
Node: Bash POSIX Mode299973
|
||||
Node: Shell Compatibility Mode311896
|
||||
Node: Job Control320457
|
||||
Node: Job Control Basics320917
|
||||
Node: Job Control Builtins325919
|
||||
Node: Job Control Variables331714
|
||||
Node: Command Line Editing332870
|
||||
Node: Introduction and Notation334541
|
||||
Node: Readline Interaction336164
|
||||
Node: Readline Bare Essentials337355
|
||||
Node: Readline Movement Commands339138
|
||||
Node: Readline Killing Commands340098
|
||||
Node: Readline Arguments342016
|
||||
Node: Searching343060
|
||||
Node: Readline Init File345246
|
||||
Node: Readline Init File Syntax346507
|
||||
Node: Conditional Init Constructs370081
|
||||
Node: Sample Init File374277
|
||||
Node: Bindable Readline Commands377401
|
||||
Node: Commands For Moving378605
|
||||
Node: Commands For History380656
|
||||
Node: Commands For Text385650
|
||||
Node: Commands For Killing389299
|
||||
Node: Numeric Arguments392332
|
||||
Node: Commands For Completion393471
|
||||
Node: Keyboard Macros397662
|
||||
Node: Miscellaneous Commands398349
|
||||
Node: Readline vi Mode404288
|
||||
Node: Programmable Completion405195
|
||||
Node: Programmable Completion Builtins412975
|
||||
Node: A Programmable Completion Example423727
|
||||
Node: Using History Interactively428974
|
||||
Node: Bash History Facilities429658
|
||||
Node: Bash History Builtins432663
|
||||
Node: History Interaction437671
|
||||
Node: Event Designators441291
|
||||
Node: Word Designators442645
|
||||
Node: Modifiers444405
|
||||
Node: Installing Bash446216
|
||||
Node: Basic Installation447353
|
||||
Node: Compilers and Options451075
|
||||
Node: Compiling For Multiple Architectures451816
|
||||
Node: Installation Names453509
|
||||
Node: Specifying the System Type455618
|
||||
Node: Sharing Defaults456334
|
||||
Node: Operation Controls457007
|
||||
Node: Optional Features457965
|
||||
Node: Reporting Bugs469184
|
||||
Node: Major Differences From The Bourne Shell470459
|
||||
Node: GNU Free Documentation License487309
|
||||
Node: Indexes512486
|
||||
Node: Builtin Index512940
|
||||
Node: Reserved Word Index519767
|
||||
Node: Variable Index522215
|
||||
Node: Function Index538989
|
||||
Node: Concept Index552773
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+852
-813
File diff suppressed because it is too large
Load Diff
+18
-3
@@ -2933,6 +2933,12 @@ Matches one of the given patterns.
|
||||
Matches anything except one of the given patterns.
|
||||
@end table
|
||||
|
||||
The @code{extglob} option changes the behavior of the parser, since the
|
||||
parentheses are normally treated as operators with syntactic meaning.
|
||||
To ensure that extended matching patterns are parsed correctly, make sure
|
||||
that @code{extglob} is enabled before parsing constructs containing the
|
||||
patterns, including shell functions and command substitutions.
|
||||
|
||||
When matching filenames, the @code{dotglob} shell option determines
|
||||
the set of filenames that are tested:
|
||||
when @code{dotglob} is enabled, the set of filenames includes all files
|
||||
@@ -8410,7 +8416,7 @@ If Bash receives a trapped signal while executing @code{read}, the trap
|
||||
handler executes and @code{read} returns an exit status greater than 128.
|
||||
|
||||
@item
|
||||
The @code{printf} builting uses @code{double} (via @code{strtod}) to convert
|
||||
The @code{printf} builtin uses @code{double} (via @code{strtod}) to convert
|
||||
arguments corresponding to floating point conversion specifiers, instead of
|
||||
@code{long double} if it's available. The @samp{L} length modifier forces
|
||||
@code{printf} to use @code{long double} if it's available.
|
||||
@@ -8642,6 +8648,15 @@ the $@{@var{parameter}[:]=@var{value}@} word expansion will return
|
||||
@var{value}, before any variable-specific transformations have been
|
||||
performed (e.g., converting to lowercase).
|
||||
Bash-5.2 will return the final value assigned to the variable.
|
||||
@item
|
||||
Parsing command substitutions will behave as if extended glob
|
||||
(@pxref{The Shopt Builtin})
|
||||
is enabled, so that parsing a command substitution containing an extglob
|
||||
pattern (say, as part of a shell function) will not fail.
|
||||
This assumes the intent is to enable extglob before the command is executed
|
||||
and word expansions are performed.
|
||||
It will fail at word expansion time if extglob hasn't been
|
||||
enabled by the time the command is executed.
|
||||
@end itemize
|
||||
@end table
|
||||
|
||||
@@ -8892,7 +8907,7 @@ The variable will be unset initially, before any assignment.
|
||||
This is useful only when the @option{-n} option is supplied.
|
||||
Supplying the @option{-f} option, when job control is enabled,
|
||||
forces @code{wait} to wait for each @var{pid} or @var{jobspec} to
|
||||
terminate before returning its status, intead of returning when it changes
|
||||
terminate before returning its status, instead of returning when it changes
|
||||
status.
|
||||
If neither @var{jobspec} nor @var{pid} specifies an active child process
|
||||
of the shell, the return status is 127.
|
||||
@@ -9329,7 +9344,7 @@ the installed version of Readline in subdirectories of that directory
|
||||
|
||||
@item --with-libintl-prefix[=@var{PREFIX}]
|
||||
Define this to make Bash link with a locally-installed version of the
|
||||
libintl library instead ofthe version in @file{lib/intl}.
|
||||
libintl library instead of the version in @file{lib/intl}.
|
||||
|
||||
@item --with-libiconv-prefix[=@var{PREFIX}]
|
||||
Define this to make Bash look for libiconv in @var{PREFIX} instead of the
|
||||
|
||||
+233
-231
@@ -245,53 +245,52 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
completions only apply to the case specified by the option.
|
||||
|
||||
The process of applying these completion specifications when
|
||||
word completion is attempted is described above under PPrrooggrraamm--
|
||||
mmaabbllee CCoommpplleettiioonn.
|
||||
word completion is attempted is described in _b_a_s_h_(_1_).
|
||||
|
||||
Other options, if specified, have the following meanings. The
|
||||
arguments to the --GG, --WW, and --XX options (and, if necessary, the
|
||||
--PP and --SS options) should be quoted to protect them from expan-
|
||||
Other options, if specified, have the following meanings. The
|
||||
arguments to the --GG, --WW, and --XX options (and, if necessary, the
|
||||
--PP and --SS options) should be quoted to protect them from expan-
|
||||
sion before the ccoommpplleettee builtin is invoked.
|
||||
--oo _c_o_m_p_-_o_p_t_i_o_n
|
||||
The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
|
||||
spec's behavior beyond the simple generation of comple-
|
||||
The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
|
||||
spec's behavior beyond the simple generation of comple-
|
||||
tions. _c_o_m_p_-_o_p_t_i_o_n may be one of:
|
||||
bbaasshhddeeffaauulltt
|
||||
Perform the rest of the default bbaasshh completions
|
||||
if the compspec generates no matches.
|
||||
ddeeffaauulltt Use readline's default filename completion if
|
||||
ddeeffaauulltt Use readline's default filename completion if
|
||||
the compspec generates no matches.
|
||||
ddiirrnnaammeess
|
||||
Perform directory name completion if the comp-
|
||||
Perform directory name completion if the comp-
|
||||
spec generates no matches.
|
||||
ffiilleennaammeess
|
||||
Tell readline that the compspec generates file-
|
||||
names, so it can perform any filename-specific
|
||||
processing (like adding a slash to directory
|
||||
names, quoting special characters, or suppress-
|
||||
ing trailing spaces). Intended to be used with
|
||||
Tell readline that the compspec generates file-
|
||||
names, so it can perform any filename-specific
|
||||
processing (like adding a slash to directory
|
||||
names, quoting special characters, or suppress-
|
||||
ing trailing spaces). Intended to be used with
|
||||
shell functions.
|
||||
nnooqquuoottee Tell readline not to quote the completed words
|
||||
if they are filenames (quoting filenames is the
|
||||
nnooqquuoottee Tell readline not to quote the completed words
|
||||
if they are filenames (quoting filenames is the
|
||||
default).
|
||||
nnoossoorrtt Tell readline not to sort the list of possible
|
||||
nnoossoorrtt Tell readline not to sort the list of possible
|
||||
completions alphabetically.
|
||||
nnoossppaaccee Tell readline not to append a space (the de-
|
||||
fault) to words completed at the end of the
|
||||
nnoossppaaccee Tell readline not to append a space (the de-
|
||||
fault) to words completed at the end of the
|
||||
line.
|
||||
pplluussddiirrss
|
||||
After any matches defined by the compspec are
|
||||
After any matches defined by the compspec are
|
||||
generated, directory name completion is at-
|
||||
tempted and any matches are added to the results
|
||||
of the other actions.
|
||||
--AA _a_c_t_i_o_n
|
||||
The _a_c_t_i_o_n may be one of the following to generate a
|
||||
The _a_c_t_i_o_n may be one of the following to generate a
|
||||
list of possible completions:
|
||||
aalliiaass Alias names. May also be specified as --aa.
|
||||
aarrrraayyvvaarr
|
||||
Array variable names.
|
||||
bbiinnddiinngg RReeaaddlliinnee key binding names.
|
||||
bbuuiillttiinn Names of shell builtin commands. May also be
|
||||
bbuuiillttiinn Names of shell builtin commands. May also be
|
||||
specified as --bb.
|
||||
ccoommmmaanndd Command names. May also be specified as --cc.
|
||||
ddiirreeccttoorryy
|
||||
@@ -299,7 +298,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
ddiissaabblleedd
|
||||
Names of disabled shell builtins.
|
||||
eennaabblleedd Names of enabled shell builtins.
|
||||
eexxppoorrtt Names of exported shell variables. May also be
|
||||
eexxppoorrtt Names of exported shell variables. May also be
|
||||
specified as --ee.
|
||||
ffiillee File names. May also be specified as --ff.
|
||||
ffuunnccttiioonn
|
||||
@@ -308,17 +307,17 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
hheellppttooppiicc
|
||||
Help topics as accepted by the hheellpp builtin.
|
||||
hhoossttnnaammee
|
||||
Hostnames, as taken from the file specified by
|
||||
Hostnames, as taken from the file specified by
|
||||
the HHOOSSTTFFIILLEE shell variable.
|
||||
jjoobb Job names, if job control is active. May also
|
||||
jjoobb Job names, if job control is active. May also
|
||||
be specified as --jj.
|
||||
kkeeyywwoorrdd Shell reserved words. May also be specified as
|
||||
kkeeyywwoorrdd Shell reserved words. May also be specified as
|
||||
--kk.
|
||||
rruunnnniinngg Names of running jobs, if job control is active.
|
||||
sseerrvviiccee Service names. May also be specified as --ss.
|
||||
sseettoopptt Valid arguments for the --oo option to the sseett
|
||||
sseettoopptt Valid arguments for the --oo option to the sseett
|
||||
builtin.
|
||||
sshhoopptt Shell option names as accepted by the sshhoopptt
|
||||
sshhoopptt Shell option names as accepted by the sshhoopptt
|
||||
builtin.
|
||||
ssiiggnnaall Signal names.
|
||||
ssttooppppeedd Names of stopped jobs, if job control is active.
|
||||
@@ -327,8 +326,9 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
Names of all shell variables. May also be spec-
|
||||
ified as --vv.
|
||||
--CC _c_o_m_m_a_n_d
|
||||
_c_o_m_m_a_n_d is executed in a subshell environment, and its
|
||||
output is used as the possible completions.
|
||||
_c_o_m_m_a_n_d is executed in a subshell environment, and its
|
||||
output is used as the possible completions. Arguments
|
||||
are passed as with the --FF option.
|
||||
--FF _f_u_n_c_t_i_o_n
|
||||
The shell function _f_u_n_c_t_i_o_n is executed in the current
|
||||
shell environment. When the function is executed, the
|
||||
@@ -424,14 +424,14 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
local variable is initially unset. The following options can be
|
||||
used to restrict output to variables with the specified attri-
|
||||
bute or to give variables attributes:
|
||||
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
|
||||
above).
|
||||
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
|
||||
above).
|
||||
--aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss in
|
||||
_b_a_s_h_(_1_)).
|
||||
--AA Each _n_a_m_e is an associative array variable (see AArrrraayyss in
|
||||
_b_a_s_h_(_1_)).
|
||||
--ff Use function names only.
|
||||
--ii The variable is treated as an integer; arithmetic evalua-
|
||||
tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when
|
||||
the variable is assigned a value.
|
||||
tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN in _b_a_s_h_(_1_)) is performed
|
||||
when the variable is assigned a value.
|
||||
--ll When the variable is assigned a value, all upper-case
|
||||
characters are converted to lower-case. The upper-case
|
||||
attribute is disabled.
|
||||
@@ -466,11 +466,11 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
to define a function using ``-f foo=bar'', an attempt is made to
|
||||
assign a value to a readonly variable, an attempt is made to as-
|
||||
sign a value to an array variable without using the compound as-
|
||||
signment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
|
||||
valid shell variable name, an attempt is made to turn off read-
|
||||
only status for a readonly variable, an attempt is made to turn
|
||||
off array status for an array variable, or an attempt is made to
|
||||
display a non-existent function with --ff.
|
||||
signment syntax (see AArrrraayyss in _b_a_s_h_(_1_)), one of the _n_a_m_e_s is not
|
||||
a valid shell variable name, an attempt is made to turn off
|
||||
readonly status for a readonly variable, an attempt is made to
|
||||
turn off array status for an array variable, or an attempt is
|
||||
made to display a non-existent function with --ff.
|
||||
|
||||
ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]]
|
||||
Without options, displays the list of currently remembered di-
|
||||
@@ -829,8 +829,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
|
||||
lleett _a_r_g [_a_r_g ...]
|
||||
Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH--
|
||||
MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett
|
||||
returns 1; 0 is returned otherwise.
|
||||
MMEETTIICC EEVVAALLUUAATTIIOONN in _b_a_s_h_(_1_)). If the last _a_r_g evaluates to 0,
|
||||
lleett returns 1; 0 is returned otherwise.
|
||||
|
||||
llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ... | - ]
|
||||
For each argument, a local variable named _n_a_m_e is created, and
|
||||
@@ -1011,17 +1011,17 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
_p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...]
|
||||
One line is read from the standard input, or from the file de-
|
||||
scriptor _f_d supplied as an argument to the --uu option, split into
|
||||
words as described above under WWoorrdd SSpplliittttiinngg, and the first
|
||||
word is assigned to the first _n_a_m_e, the second word to the sec-
|
||||
ond _n_a_m_e, and so on. If there are more words than names, the
|
||||
words as described in _b_a_s_h_(_1_) under WWoorrdd SSpplliittttiinngg, and the
|
||||
first word is assigned to the first _n_a_m_e, the second word to the
|
||||
second _n_a_m_e, and so on. If there are more words than names, the
|
||||
remaining words and their intervening delimiters are assigned to
|
||||
the last _n_a_m_e. If there are fewer words read from the input
|
||||
stream than names, the remaining names are assigned empty val-
|
||||
ues. The characters in IIFFSS are used to split the line into
|
||||
words using the same rules the shell uses for expansion (de-
|
||||
scribed above under WWoorrdd SSpplliittttiinngg). The backslash character
|
||||
(\\) may be used to remove any special meaning for the next char-
|
||||
acter read and for line continuation. Options, if supplied,
|
||||
scribed in _b_a_s_h_(_1_) under WWoorrdd SSpplliittttiinngg). The backslash charac-
|
||||
ter (\\) may be used to remove any special meaning for the next
|
||||
character read and for line continuation. Options, if supplied,
|
||||
have the following meanings:
|
||||
--aa _a_n_a_m_e
|
||||
The words are assigned to sequential indices of the array
|
||||
@@ -1034,10 +1034,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
string, rreeaadd will terminate a line when it reads a NUL
|
||||
character.
|
||||
--ee If the standard input is coming from a terminal, rreeaaddlliinnee
|
||||
(see RREEAADDLLIINNEE above) is used to obtain the line. Read-
|
||||
line uses the current (or default, if line editing was
|
||||
not previously active) editing settings, but uses Read-
|
||||
line's default filename completion.
|
||||
(see RREEAADDLLIINNEE in _b_a_s_h_(_1_)) is used to obtain the line.
|
||||
Readline uses the current (or default, if line editing
|
||||
was not previously active) editing settings, but uses
|
||||
Readline's default filename completion.
|
||||
--ii _t_e_x_t
|
||||
If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
|
||||
placed into the editing buffer before editing begins.
|
||||
@@ -1148,22 +1148,22 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
is effective only when job control is enabled.
|
||||
--ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a
|
||||
single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d
|
||||
(see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status.
|
||||
The shell does not exit if the command that fails is
|
||||
part of the command list immediately following a wwhhiillee
|
||||
or uunnttiill keyword, part of the test following the iiff or
|
||||
eelliiff reserved words, part of any command executed in a
|
||||
&&&& or |||| list except the command following the final &&&&
|
||||
or ||||, any command in a pipeline but the last, or if the
|
||||
command's return value is being inverted with !!. If a
|
||||
compound command other than a subshell returns a non-
|
||||
zero status because a command failed while --ee was being
|
||||
ignored, the shell does not exit. A trap on EERRRR, if
|
||||
set, is executed before the shell exits. This option
|
||||
(see SSHHEELLLL GGRRAAMMMMAARR in _b_a_s_h_(_1_)), exits with a non-zero
|
||||
status. The shell does not exit if the command that
|
||||
fails is part of the command list immediately following
|
||||
a wwhhiillee or uunnttiill keyword, part of the test following the
|
||||
iiff or eelliiff reserved words, part of any command executed
|
||||
in a &&&& or |||| list except the command following the fi-
|
||||
nal &&&& or ||||, any command in a pipeline but the last, or
|
||||
if the command's return value is being inverted with !!.
|
||||
If a compound command other than a subshell returns a
|
||||
non-zero status because a command failed while --ee was
|
||||
being ignored, the shell does not exit. A trap on EERRRR,
|
||||
if set, is executed before the shell exits. This option
|
||||
applies to the shell environment and each subshell envi-
|
||||
ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
|
||||
above), and may cause subshells to exit before executing
|
||||
all the commands in the subshell.
|
||||
ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT in
|
||||
_b_a_s_h_(_1_)), and may cause subshells to exit before execut-
|
||||
ing all the commands in the subshell.
|
||||
|
||||
If a compound command or shell function executes in a
|
||||
context where --ee is being ignored, none of the commands
|
||||
@@ -1182,10 +1182,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
that precede the command name.
|
||||
--mm Monitor mode. Job control is enabled. This option is
|
||||
on by default for interactive shells on systems that
|
||||
support it (see JJOOBB CCOONNTTRROOLL above). All processes run
|
||||
in a separate process group. When a background job com-
|
||||
pletes, the shell prints a line containing its exit sta-
|
||||
tus.
|
||||
support it (see JJOOBB CCOONNTTRROOLL in _b_a_s_h_(_1_)). All processes
|
||||
run in a separate process group. When a background job
|
||||
completes, the shell prints a line containing its exit
|
||||
status.
|
||||
--nn Read commands but do not execute them. This may be used
|
||||
to check a shell script for syntax errors. This is ig-
|
||||
nored by interactive shells.
|
||||
@@ -1208,13 +1208,13 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
hhaasshhaallll Same as --hh.
|
||||
hhiisstteexxppaanndd
|
||||
Same as --HH.
|
||||
hhiissttoorryy Enable command history, as described above under
|
||||
HHIISSTTOORRYY. This option is on by default in inter-
|
||||
active shells.
|
||||
hhiissttoorryy Enable command history, as described in _b_a_s_h_(_1_)
|
||||
under HHIISSTTOORRYY. This option is on by default in
|
||||
interactive shells.
|
||||
iiggnnoorreeeeooff
|
||||
The effect is as if the shell command ``IG-
|
||||
NOREEOF=10'' had been executed (see SShheellll VVaarrii--
|
||||
aabblleess above).
|
||||
aabblleess in _b_a_s_h_(_1_)).
|
||||
kkeeyywwoorrdd Same as --kk.
|
||||
mmoonniittoorr Same as --mm.
|
||||
nnoocclloobbbbeerr
|
||||
@@ -1236,8 +1236,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
ppoossiixx Change the behavior of bbaasshh where the default
|
||||
operation differs from the POSIX standard to
|
||||
match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO
|
||||
below for a reference to a document that details
|
||||
how posix mode affects bash's behavior.
|
||||
in _b_a_s_h_(_1_) for a reference to a document that
|
||||
details how posix mode affects bash's behavior.
|
||||
pprriivviilleeggeedd
|
||||
Same as --pp.
|
||||
vveerrbboossee Same as --vv.
|
||||
@@ -1278,7 +1278,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
play the expanded value of PPSS44, followed by the command
|
||||
and its expanded arguments or associated word list.
|
||||
--BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn
|
||||
above). This is on by default.
|
||||
in _b_a_s_h_(_1_)). This is on by default.
|
||||
--CC If set, bbaasshh does not overwrite an existing file with
|
||||
the >>, >>&&, and <<>> redirection operators. This may be
|
||||
overridden when creating output files by using the redi-
|
||||
@@ -1386,8 +1386,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
jobs before exiting an interactive shell. If any jobs
|
||||
are running, this causes the exit to be deferred until a
|
||||
second exit is attempted without an intervening command
|
||||
(see JJOOBB CCOONNTTRROOLL above). The shell always postpones ex-
|
||||
iting if any jobs are stopped.
|
||||
(see JJOOBB CCOONNTTRROOLL in _b_a_s_h_(_1_)). The shell always post-
|
||||
pones exiting if any jobs are stopped.
|
||||
cchheecckkwwiinnssiizzee
|
||||
If set, bbaasshh checks the window size after each external
|
||||
(non-builtin) command and, if necessary, updates the
|
||||
@@ -1397,7 +1397,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
line command in the same history entry. This allows
|
||||
easy re-editing of multi-line commands. This option is
|
||||
enabled by default, but only has an effect if command
|
||||
history is enabled, as described above under HHIISSTTOORRYY.
|
||||
history is enabled, as described in _b_a_s_h_(_1_) under HHIISS--
|
||||
TTOORRYY.
|
||||
ccoommppaatt3311
|
||||
ccoommppaatt3322
|
||||
ccoommppaatt4400
|
||||
@@ -1406,122 +1407,122 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
ccoommppaatt4433
|
||||
ccoommppaatt4444
|
||||
ccoommppaatt5500
|
||||
These control aspects of the shell's compatibility mode
|
||||
(see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below).
|
||||
These control aspects of the shell's compatibility mode
|
||||
(see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE in _b_a_s_h_(_1_)).
|
||||
|
||||
ccoommpplleettee__ffuullllqquuoottee
|
||||
If set, bbaasshh quotes all shell metacharacters in file-
|
||||
names and directory names when performing completion.
|
||||
If set, bbaasshh quotes all shell metacharacters in file-
|
||||
names and directory names when performing completion.
|
||||
If not set, bbaasshh removes metacharacters such as the dol-
|
||||
lar sign from the set of characters that will be quoted
|
||||
in completed filenames when these metacharacters appear
|
||||
in shell variable references in words to be completed.
|
||||
This means that dollar signs in variable names that ex-
|
||||
pand to directories will not be quoted; however, any
|
||||
dollar signs appearing in filenames will not be quoted,
|
||||
either. This is active only when bash is using back-
|
||||
slashes to quote completed filenames. This variable is
|
||||
set by default, which is the default bash behavior in
|
||||
lar sign from the set of characters that will be quoted
|
||||
in completed filenames when these metacharacters appear
|
||||
in shell variable references in words to be completed.
|
||||
This means that dollar signs in variable names that ex-
|
||||
pand to directories will not be quoted; however, any
|
||||
dollar signs appearing in filenames will not be quoted,
|
||||
either. This is active only when bash is using back-
|
||||
slashes to quote completed filenames. This variable is
|
||||
set by default, which is the default bash behavior in
|
||||
versions through 4.2.
|
||||
|
||||
ddiirreexxppaanndd
|
||||
If set, bbaasshh replaces directory names with the results
|
||||
of word expansion when performing filename completion.
|
||||
This changes the contents of the readline editing buf-
|
||||
fer. If not set, bbaasshh attempts to preserve what the
|
||||
If set, bbaasshh replaces directory names with the results
|
||||
of word expansion when performing filename completion.
|
||||
This changes the contents of the readline editing buf-
|
||||
fer. If not set, bbaasshh attempts to preserve what the
|
||||
user typed.
|
||||
|
||||
ddiirrssppeellll
|
||||
If set, bbaasshh attempts spelling correction on directory
|
||||
names during word completion if the directory name ini-
|
||||
If set, bbaasshh attempts spelling correction on directory
|
||||
names during word completion if the directory name ini-
|
||||
tially supplied does not exist.
|
||||
|
||||
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
|
||||
the results of pathname expansion. The filenames ````..''''
|
||||
and ````....'''' must always be matched explicitly, even if
|
||||
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
|
||||
the results of pathname expansion. The filenames ````..''''
|
||||
and ````....'''' must always be matched explicitly, even if
|
||||
ddoottgglloobb is set.
|
||||
|
||||
eexxeeccffaaiill
|
||||
If set, a non-interactive shell will not exit if it can-
|
||||
not execute the file specified as an argument to the
|
||||
eexxeecc builtin command. An interactive shell does not
|
||||
not execute the file specified as an argument to the
|
||||
eexxeecc builtin command. An interactive shell does not
|
||||
exit if eexxeecc fails.
|
||||
|
||||
eexxppaanndd__aalliiaasseess
|
||||
If set, aliases are expanded as described above under
|
||||
AALLIIAASSEESS. This option is enabled by default for interac-
|
||||
tive shells.
|
||||
If set, aliases are expanded as described in _b_a_s_h_(_1_) un-
|
||||
der AALLIIAASSEESS. This option is enabled by default for in-
|
||||
teractive shells.
|
||||
|
||||
eexxttddeebbuugg
|
||||
If set at shell invocation, or in a shell startup file,
|
||||
If set at shell invocation, or in a shell startup file,
|
||||
arrange to execute the debugger profile before the shell
|
||||
starts, identical to the ----ddeebbuuggggeerr option. If set af-
|
||||
ter invocation, behavior intended for use by debuggers
|
||||
starts, identical to the ----ddeebbuuggggeerr option. If set af-
|
||||
ter invocation, behavior intended for use by debuggers
|
||||
is enabled:
|
||||
|
||||
11.. The --FF option to the ddeeccllaarree builtin displays the
|
||||
source file name and line number corresponding to
|
||||
each function name supplied as an argument.
|
||||
|
||||
22.. If the command run by the DDEEBBUUGG trap returns a
|
||||
non-zero value, the next command is skipped and
|
||||
22.. If the command run by the DDEEBBUUGG trap returns a
|
||||
non-zero value, the next command is skipped and
|
||||
not executed.
|
||||
|
||||
33.. If the command run by the DDEEBBUUGG trap returns a
|
||||
value of 2, and the shell is executing in a sub-
|
||||
routine (a shell function or a shell script exe-
|
||||
cuted by the .. or ssoouurrccee builtins), the shell
|
||||
33.. If the command run by the DDEEBBUUGG trap returns a
|
||||
value of 2, and the shell is executing in a sub-
|
||||
routine (a shell function or a shell script exe-
|
||||
cuted by the .. or ssoouurrccee builtins), the shell
|
||||
simulates a call to rreettuurrnn.
|
||||
|
||||
44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
|
||||
in their descriptions above.
|
||||
44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
|
||||
in their descriptions in _b_a_s_h_(_1_)).
|
||||
|
||||
55.. Function tracing is enabled: command substitu-
|
||||
55.. Function tracing is enabled: command substitu-
|
||||
tion, shell functions, and subshells invoked with
|
||||
(( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps.
|
||||
|
||||
66.. Error tracing is enabled: command substitution,
|
||||
shell functions, and subshells invoked with ((
|
||||
66.. Error tracing is enabled: command substitution,
|
||||
shell functions, and subshells invoked with ((
|
||||
_c_o_m_m_a_n_d )) inherit the EERRRR trap.
|
||||
|
||||
eexxttgglloobb If set, the extended pattern matching features described
|
||||
above under PPaatthhnnaammee EExxppaannssiioonn are enabled.
|
||||
in _b_a_s_h_(_1_) under PPaatthhnnaammee EExxppaannssiioonn are enabled.
|
||||
|
||||
eexxttqquuoottee
|
||||
If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
|
||||
within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
|
||||
If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
|
||||
within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
|
||||
quotes. This option is enabled by default.
|
||||
|
||||
ffaaiillgglloobb
|
||||
If set, patterns which fail to match filenames during
|
||||
If set, patterns which fail to match filenames during
|
||||
pathname expansion result in an expansion error.
|
||||
|
||||
ffoorrccee__ffiiggnnoorree
|
||||
If set, the suffixes specified by the FFIIGGNNOORREE shell
|
||||
variable cause words to be ignored when performing word
|
||||
If set, the suffixes specified by the FFIIGGNNOORREE shell
|
||||
variable cause words to be ignored when performing word
|
||||
completion even if the ignored words are the only possi-
|
||||
ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a de-
|
||||
scription of FFIIGGNNOORREE. This option is enabled by de-
|
||||
ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS in _b_a_s_h_(_1_) for a
|
||||
description of FFIIGGNNOORREE. This option is enabled by de-
|
||||
fault.
|
||||
|
||||
gglloobbaasscciiiirraannggeess
|
||||
If set, range expressions used in pattern matching
|
||||
bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave
|
||||
as if in the traditional C locale when performing com-
|
||||
parisons. That is, the current locale's collating se-
|
||||
quence is not taken into account, so bb will not collate
|
||||
between AA and BB, and upper-case and lower-case ASCII
|
||||
characters will collate together.
|
||||
If set, range expressions used in pattern matching
|
||||
bracket expressions (see PPaatttteerrnn MMaattcchhiinngg in _b_a_s_h_(_1_))
|
||||
behave as if in the traditional C locale when performing
|
||||
comparisons. That is, the current locale's collating
|
||||
sequence is not taken into account, so bb will not col-
|
||||
late between AA and BB, and upper-case and lower-case
|
||||
ASCII characters will collate together.
|
||||
|
||||
gglloobbsskkiippddoottss
|
||||
If set, pathname expansion will never match the file-
|
||||
If set, pathname expansion will never match the file-
|
||||
names ````..'''' and ````....'''', even if the pattern begins with
|
||||
a ````..''''. This option is enabled by default.
|
||||
|
||||
gglloobbssttaarr
|
||||
If set, the pattern **** used in a pathname expansion con-
|
||||
text will match all files and zero or more directories
|
||||
and subdirectories. If the pattern is followed by a //,
|
||||
text will match all files and zero or more directories
|
||||
and subdirectories. If the pattern is followed by a //,
|
||||
only directories and subdirectories match.
|
||||
|
||||
ggnnuu__eerrrrffmmtt
|
||||
@@ -1529,49 +1530,49 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
GNU error message format.
|
||||
|
||||
hhiissttaappppeenndd
|
||||
If set, the history list is appended to the file named
|
||||
If set, the history list is appended to the file named
|
||||
by the value of the HHIISSTTFFIILLEE variable when the shell ex-
|
||||
its, rather than overwriting the file.
|
||||
|
||||
hhiissttrreeeeddiitt
|
||||
If set, and rreeaaddlliinnee is being used, a user is given the
|
||||
If set, and rreeaaddlliinnee is being used, a user is given the
|
||||
opportunity to re-edit a failed history substitution.
|
||||
|
||||
hhiissttvveerriiffyy
|
||||
If set, and rreeaaddlliinnee is being used, the results of his-
|
||||
tory substitution are not immediately passed to the
|
||||
shell parser. Instead, the resulting line is loaded
|
||||
If set, and rreeaaddlliinnee is being used, the results of his-
|
||||
tory substitution are not immediately passed to the
|
||||
shell parser. Instead, the resulting line is loaded
|
||||
into the rreeaaddlliinnee editing buffer, allowing further modi-
|
||||
fication.
|
||||
|
||||
hhoossttccoommpplleettee
|
||||
If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to
|
||||
perform hostname completion when a word containing a @@
|
||||
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
|
||||
above). This is enabled by default.
|
||||
perform hostname completion when a word containing a @@
|
||||
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE in
|
||||
_b_a_s_h_(_1_)). This is enabled by default.
|
||||
|
||||
hhuuppoonneexxiitt
|
||||
If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter-
|
||||
active login shell exits.
|
||||
|
||||
iinnhheerriitt__eerrrreexxiitt
|
||||
If set, command substitution inherits the value of the
|
||||
eerrrreexxiitt option, instead of unsetting it in the subshell
|
||||
environment. This option is enabled when _p_o_s_i_x _m_o_d_e is
|
||||
If set, command substitution inherits the value of the
|
||||
eerrrreexxiitt option, instead of unsetting it in the subshell
|
||||
environment. This option is enabled when _p_o_s_i_x _m_o_d_e is
|
||||
enabled.
|
||||
|
||||
iinntteerraaccttiivvee__ccoommmmeennttss
|
||||
If set, allow a word beginning with ## to cause that word
|
||||
and all remaining characters on that line to be ignored
|
||||
in an interactive shell (see CCOOMMMMEENNTTSS above). This op-
|
||||
tion is enabled by default.
|
||||
and all remaining characters on that line to be ignored
|
||||
in an interactive shell (see CCOOMMMMEENNTTSS in _b_a_s_h_(_1_)). This
|
||||
option is enabled by default.
|
||||
|
||||
llaassttppiippee
|
||||
If set, and job control is not active, the shell runs
|
||||
If set, and job control is not active, the shell runs
|
||||
the last command of a pipeline not executed in the back-
|
||||
ground in the current shell environment.
|
||||
|
||||
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
|
||||
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
|
||||
commands are saved to the history with embedded newlines
|
||||
rather than using semicolon separators where possible.
|
||||
|
||||
@@ -1582,118 +1583,117 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
tribute is not inherited.
|
||||
|
||||
llooccaallvvaarr__uunnsseett
|
||||
If set, calling uunnsseett on local variables in previous
|
||||
function scopes marks them so subsequent lookups find
|
||||
them unset until that function returns. This is identi-
|
||||
cal to the behavior of unsetting local variables at the
|
||||
If set, calling uunnsseett on local variables in previous
|
||||
function scopes marks them so subsequent lookups find
|
||||
them unset until that function returns. This is identi-
|
||||
cal to the behavior of unsetting local variables at the
|
||||
current function scope.
|
||||
|
||||
llooggiinn__sshheellll
|
||||
The shell sets this option if it is started as a login
|
||||
shell (see IINNVVOOCCAATTIIOONN above). The value may not be
|
||||
The shell sets this option if it is started as a login
|
||||
shell (see IINNVVOOCCAATTIIOONN in _b_a_s_h_(_1_)). The value may not be
|
||||
changed.
|
||||
|
||||
mmaaiillwwaarrnn
|
||||
If set, and a file that bbaasshh is checking for mail has
|
||||
been accessed since the last time it was checked, the
|
||||
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
|
||||
If set, and a file that bbaasshh is checking for mail has
|
||||
been accessed since the last time it was checked, the
|
||||
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
|
||||
played.
|
||||
|
||||
nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn
|
||||
If set, and rreeaaddlliinnee is being used, bbaasshh will not at-
|
||||
tempt to search the PPAATTHH for possible completions when
|
||||
If set, and rreeaaddlliinnee is being used, bbaasshh will not at-
|
||||
tempt to search the PPAATTHH for possible completions when
|
||||
completion is attempted on an empty line.
|
||||
|
||||
nnooccaasseegglloobb
|
||||
If set, bbaasshh matches filenames in a case-insensitive
|
||||
If set, bbaasshh matches filenames in a case-insensitive
|
||||
fashion when performing pathname expansion (see PPaatthhnnaammee
|
||||
EExxppaannssiioonn above).
|
||||
EExxppaannssiioonn in _b_a_s_h_(_1_)).
|
||||
|
||||
nnooccaasseemmaattcchh
|
||||
If set, bbaasshh matches patterns in a case-insensitive
|
||||
If set, bbaasshh matches patterns in a case-insensitive
|
||||
fashion when performing matching while executing ccaassee or
|
||||
[[[[ conditional commands, when performing pattern substi-
|
||||
tution word expansions, or when filtering possible com-
|
||||
tution word expansions, or when filtering possible com-
|
||||
pletions as part of programmable completion.
|
||||
|
||||
nnooeexxppaanndd__ttrraannssllaattiioonn
|
||||
If set, bbaasshh encloses the translated results of $"..."
|
||||
quoting in single quotes instead of double quotes. If
|
||||
If set, bbaasshh encloses the translated results of $"..."
|
||||
quoting in single quotes instead of double quotes. If
|
||||
the string is not translated, this has no effect.
|
||||
|
||||
nnuullllgglloobb
|
||||
If set, bbaasshh allows patterns which match no files (see
|
||||
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
|
||||
rather than themselves.
|
||||
If set, bbaasshh allows patterns which match no files (see
|
||||
PPaatthhnnaammee EExxppaannssiioonn in _b_a_s_h_(_1_)) to expand to a null
|
||||
string, rather than themselves.
|
||||
|
||||
ppaattssuubb__rreeppllaacceemmeenntt
|
||||
If set, bbaasshh expands occurrences of && in the replacement
|
||||
string of pattern substitution to the text matched by
|
||||
the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn
|
||||
above. This option is enabled by default.
|
||||
string of pattern substitution to the text matched by
|
||||
the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn in
|
||||
_b_a_s_h_(_1_). This option is enabled by default.
|
||||
|
||||
pprrooggccoommpp
|
||||
If set, the programmable completion facilities (see PPrroo--
|
||||
ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is
|
||||
enabled by default.
|
||||
ggrraammmmaabbllee CCoommpplleettiioonn in _b_a_s_h_(_1_)) are enabled. This op-
|
||||
tion is enabled by default.
|
||||
|
||||
pprrooggccoommpp__aalliiaass
|
||||
If set, and programmable completion is enabled, bbaasshh
|
||||
treats a command name that doesn't have any completions
|
||||
as a possible alias and attempts alias expansion. If it
|
||||
has an alias, bbaasshh attempts programmable completion us-
|
||||
If set, and programmable completion is enabled, bbaasshh
|
||||
treats a command name that doesn't have any completions
|
||||
as a possible alias and attempts alias expansion. If it
|
||||
has an alias, bbaasshh attempts programmable completion us-
|
||||
ing the command word resulting from the expanded alias.
|
||||
|
||||
pprroommppttvvaarrss
|
||||
If set, prompt strings undergo parameter expansion, com-
|
||||
mand substitution, arithmetic expansion, and quote re-
|
||||
moval after being expanded as described in PPRROOMMPPTTIINNGG
|
||||
above. This option is enabled by default.
|
||||
mand substitution, arithmetic expansion, and quote re-
|
||||
moval after being expanded as described in PPRROOMMPPTTIINNGG in
|
||||
_b_a_s_h_(_1_). This option is enabled by default.
|
||||
|
||||
rreessttrriicctteedd__sshheellll
|
||||
The shell sets this option if it is started in re-
|
||||
stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value
|
||||
may not be changed. This is not reset when the startup
|
||||
files are executed, allowing the startup files to dis-
|
||||
cover whether or not a shell is restricted.
|
||||
The shell sets this option if it is started in re-
|
||||
stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL in _b_a_s_h_(_1_)). The
|
||||
value may not be changed. This is not reset when the
|
||||
startup files are executed, allowing the startup files
|
||||
to discover whether or not a shell is restricted.
|
||||
|
||||
sshhiifftt__vveerrbboossee
|
||||
If set, the sshhiifftt builtin prints an error message when
|
||||
If set, the sshhiifftt builtin prints an error message when
|
||||
the shift count exceeds the number of positional parame-
|
||||
ters.
|
||||
|
||||
ssoouurrcceeppaatthh
|
||||
If set, the .. (ssoouurrccee) builtin uses the value of PPAATTHH to
|
||||
find the directory containing the file supplied as an
|
||||
find the directory containing the file supplied as an
|
||||
argument. This option is enabled by default.
|
||||
|
||||
vvaarrrreeddiirr__cclloossee
|
||||
If set, the shell automatically closes file descriptors
|
||||
If set, the shell automatically closes file descriptors
|
||||
assigned using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREE--
|
||||
DDIIRREECCTTIIOONN above) instead of leaving them open when the
|
||||
command completes.
|
||||
DDIIRREECCTTIIOONN in _b_a_s_h_(_1_)) instead of leaving them open when
|
||||
the command completes.
|
||||
|
||||
xxppgg__eecchhoo
|
||||
If set, the eecchhoo builtin expands backslash-escape se-
|
||||
If set, the eecchhoo builtin expands backslash-escape se-
|
||||
quences by default.
|
||||
|
||||
ssuussppeenndd [--ff]
|
||||
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
|
||||
signal. A login shell, or a shell without job control enabled,
|
||||
cannot be suspended; the --ff option can be used to override this
|
||||
and force the suspension. The return status is 0 unless the
|
||||
shell is a login shell or job control is not enabled and --ff is
|
||||
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
|
||||
signal. A login shell, or a shell without job control enabled,
|
||||
cannot be suspended; the --ff option can be used to override this
|
||||
and force the suspension. The return status is 0 unless the
|
||||
shell is a login shell or job control is not enabled and --ff is
|
||||
not supplied.
|
||||
|
||||
tteesstt _e_x_p_r
|
||||
[[ _e_x_p_r ]]
|
||||
Return a status of 0 (true) or 1 (false) depending on the evalu-
|
||||
ation of the conditional expression _e_x_p_r. Each operator and op-
|
||||
erand must be a separate argument. Expressions are composed of
|
||||
the primaries described in the bbaasshh manual page under CCOONNDDII--
|
||||
TTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not accept any options, nor does
|
||||
it accept and ignore an argument of ---- as signifying the end of
|
||||
options.
|
||||
erand must be a separate argument. Expressions are composed of
|
||||
the primaries described in _b_a_s_h_(_1_) under CCOONNDDIITTIIOONNAALL EEXXPPRREESS--
|
||||
SSIIOONNSS. tteesstt does not accept any options, nor does it accept and
|
||||
ignore an argument of ---- as signifying the end of options.
|
||||
|
||||
Expressions may be combined using the following operators,
|
||||
listed in decreasing order of precedence. The evaluation de-
|
||||
@@ -1719,24 +1719,24 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
2 arguments
|
||||
If the first argument is !!, the expression is true if and
|
||||
only if the second argument is null. If the first argu-
|
||||
ment is one of the unary conditional operators listed
|
||||
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
|
||||
ment is one of the unary conditional operators listed in
|
||||
_b_a_s_h_(_1_) under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
|
||||
true if the unary test is true. If the first argument is
|
||||
not a valid unary conditional operator, the expression is
|
||||
false.
|
||||
3 arguments
|
||||
The following conditions are applied in the order listed.
|
||||
If the second argument is one of the binary conditional
|
||||
operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
|
||||
result of the expression is the result of the binary test
|
||||
using the first and third arguments as operands. The --aa
|
||||
and --oo operators are considered binary operators when
|
||||
there are three arguments. If the first argument is !!,
|
||||
the value is the negation of the two-argument test using
|
||||
the second and third arguments. If the first argument is
|
||||
exactly (( and the third argument is exactly )), the result
|
||||
is the one-argument test of the second argument. Other-
|
||||
wise, the expression is false.
|
||||
operators listed in _b_a_s_h_(_1_) under CCOONNDDIITTIIOONNAALL EEXXPPRREESS--
|
||||
SSIIOONNSS, the result of the expression is the result of the
|
||||
binary test using the first and third arguments as oper-
|
||||
ands. The --aa and --oo operators are considered binary op-
|
||||
erators when there are three arguments. If the first ar-
|
||||
gument is !!, the value is the negation of the two-argu-
|
||||
ment test using the second and third arguments. If the
|
||||
first argument is exactly (( and the third argument is ex-
|
||||
actly )), the result is the one-argument test of the sec-
|
||||
ond argument. Otherwise, the expression is false.
|
||||
4 arguments
|
||||
The following conditions are applied in the order listed.
|
||||
If the first argument is !!, the result is the negation of
|
||||
@@ -1777,12 +1777,12 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
|
||||
cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
|
||||
_s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
|
||||
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
|
||||
above). Refer to the description of the eexxttddeebbuugg option to the
|
||||
sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a
|
||||
_s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell
|
||||
function or a script executed with the .. or ssoouurrccee builtins fin-
|
||||
ishes executing.
|
||||
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR in
|
||||
_b_a_s_h_(_1_)). Refer to the description of the eexxttddeebbuugg option to
|
||||
the sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap.
|
||||
If a _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a
|
||||
shell function or a script executed with the .. or ssoouurrccee
|
||||
builtins finishes executing.
|
||||
|
||||
If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a
|
||||
pipeline (which may consist of a single simple command), a list,
|
||||
@@ -1936,8 +1936,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
when job control is enabled, forces wwaaiitt to wait for _i_d to ter-
|
||||
minate before returning its status, instead of returning when it
|
||||
changes status. If _i_d specifies a non-existent process or job,
|
||||
the return status is 127. Otherwise, the return status is the
|
||||
exit status of the last process or job waited for.
|
||||
the return status is 127. If wwaaiitt is interrupted by a signal,
|
||||
the return status will be greater than 128, as described under
|
||||
SSIIGGNNAALLSS in _b_a_s_h_(_1_). Otherwise, the return status is the exit
|
||||
status of the last process or job waited for.
|
||||
|
||||
SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE
|
||||
Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci-
|
||||
@@ -1952,7 +1954,7 @@ SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE
|
||||
This section does not mention behavior that is standard for a particu-
|
||||
lar version (e.g., setting ccoommppaatt3322 means that quoting the rhs of the
|
||||
regexp matching operator quotes special regexp characters in the word,
|
||||
which is default behavior in bash-3.2 and above).
|
||||
which is default behavior in bash-3.2 and subsequent versions).
|
||||
|
||||
If a user enables, say, ccoommppaatt3322, it may affect the behavior of other
|
||||
compatibility levels up to and including the current compatibility
|
||||
|
||||
+677
-667
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.4
|
||||
%%CreationDate: Mon Jun 13 11:04:35 2022
|
||||
%%CreationDate: Fri Aug 12 11:28:42 2022
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.22 4
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2022 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Fri Jun 3 10:47:05 EDT 2022
|
||||
@set LASTCHANGE Fri Jul 29 08:59:54 EDT 2022
|
||||
|
||||
@set EDITION 5.2
|
||||
@set VERSION 5.2
|
||||
|
||||
@set UPDATED 3 June 2022
|
||||
@set UPDATED-MONTH June 2022
|
||||
@set UPDATED 29 July 2022
|
||||
@set UPDATED-MONTH July 2022
|
||||
|
||||
@@ -427,7 +427,7 @@ NOTES
|
||||
bypass the shim creation and just source in the function's file
|
||||
directly. For a few calls, the overhead of repeatedly running the
|
||||
shim is not expensive, but in a tight loop, it might be. Caveat
|
||||
Programer.
|
||||
Programmer.
|
||||
|
||||
o Although the number of functions in the environment does not change
|
||||
by using 'autoload', the amount of memory they take up can be greatly
|
||||
@@ -453,7 +453,7 @@ NOTES
|
||||
the simplest to implement for -p and -s operations that are not
|
||||
heavily used.
|
||||
|
||||
As a consquence of this (and other reasons), the AUTOLOAD* namespace
|
||||
As a consequence of this (and other reasons), the AUTOLOAD* namespace
|
||||
is reserved for autoloading. Make sure you check any functions that
|
||||
you bring under autoload for use of variables or functions that start
|
||||
with AUTOLOAD and change them.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# C-shell compatibilty package.
|
||||
# C-shell compatibility package.
|
||||
# setenv VAR VALUE
|
||||
function setenv ()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Simple makefile for the sample loadable builtins
|
||||
#
|
||||
# Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2022 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
|
||||
@@ -104,7 +104,7 @@ 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 cut stat getconf
|
||||
accept csv dsv cut stat getconf
|
||||
OTHERPROG = necho hello cat pushd asort
|
||||
|
||||
all: $(SHOBJ_STATUS)
|
||||
@@ -222,6 +222,9 @@ realpath: realpath.o
|
||||
csv: csv.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ csv.o $(SHOBJ_LIBS)
|
||||
|
||||
dsv: dsv.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dsv.o $(SHOBJ_LIBS)
|
||||
|
||||
cut: cut.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
|
||||
|
||||
@@ -313,6 +316,7 @@ necho.o: necho.c
|
||||
hello.o: hello.c
|
||||
cat.o: cat.c
|
||||
csv.o: csv.c
|
||||
dsv.o: dsv.c
|
||||
cut.o: cut.c
|
||||
printenv.o: printenv.c
|
||||
id.o: id.c
|
||||
|
||||
@@ -417,7 +417,9 @@ cutfile (v, list, ops)
|
||||
while ((n = zgetline (fd, &line, &llen, '\n', unbuffered_read)) != -1)
|
||||
{
|
||||
QUIT;
|
||||
cutline (v, line, ops); /* can modify line */
|
||||
if (line[n] == '\n')
|
||||
line[n] = '\0'; /* cutline expects no newline terminator */
|
||||
cutline (v, line, ops); /* can modify line */
|
||||
}
|
||||
if (fd > 0)
|
||||
close (fd);
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
/* dsv - process a line of delimiter-separated data and populate an indexed
|
||||
array with the fields */
|
||||
|
||||
/*
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
|
||||
Bash 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.
|
||||
|
||||
Bash 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 Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* See Makefile for compilation details. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include "bashansi.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "loadables.h"
|
||||
|
||||
#define DSV_ARRAY_DEFAULT "DSV"
|
||||
|
||||
#define NQUOTE 0
|
||||
#define DQUOTE 1
|
||||
#define SQUOTE 2
|
||||
|
||||
#define F_SHELLQUOTE 0x01
|
||||
#define F_GREEDY 0x02
|
||||
#define F_PRESERVE 0x04
|
||||
|
||||
/* Split LINE into delimiter-separated fields, storing each field into a
|
||||
separate element of array variable DSV, starting at index 0. The format
|
||||
of LINE is delimiter-separated values. By default, this splits lines of
|
||||
CSV data as described in RFC 4180. If *DSTRING is any other value than
|
||||
',', this uses that character as a field delimiter. Pass F_SHELLQUOTE in
|
||||
FLAGS to understand shell-like double-quoting and backslash-escaping in
|
||||
double quotes instead of the "" CSV behavior, and shell-like single quotes.
|
||||
Pass F_GREEDY in FLAGS to consume multiple leading and trailing instances
|
||||
of *DSTRING and consecutive instances of *DSTRING in LINE without creating
|
||||
null fields. If you want to preserve the quote characters in the generated
|
||||
fields, pass F_PRESERVE; by default, this removes them. */
|
||||
static int
|
||||
dsvsplit (dsv, line, dstring, flags)
|
||||
SHELL_VAR *dsv;
|
||||
char *line, *dstring;
|
||||
int flags;
|
||||
{
|
||||
arrayind_t ind;
|
||||
char *field, *prev, *buf, *xbuf;
|
||||
int delim, qstate;
|
||||
int b, rval;
|
||||
|
||||
xbuf = 0;
|
||||
ind = 0;
|
||||
field = prev = line;
|
||||
|
||||
/* If we want a greedy split, consume leading instances of *DSTRING */
|
||||
if (flags & F_GREEDY)
|
||||
{
|
||||
while (*prev == *dstring)
|
||||
prev++;
|
||||
field = prev;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (*prev == '"')
|
||||
{
|
||||
if (xbuf == 0)
|
||||
xbuf = xmalloc (strlen (prev) + 1);
|
||||
buf = xbuf;
|
||||
b = 0;
|
||||
if (flags & F_PRESERVE)
|
||||
buf[b++] = *prev;
|
||||
qstate = DQUOTE;
|
||||
for (field = ++prev; *field; field++)
|
||||
{
|
||||
if (qstate == DQUOTE && *field == '"' && field[1] == '"' && (flags & F_SHELLQUOTE) == 0)
|
||||
buf[b++] = *field++; /* skip double quote */
|
||||
else if (qstate == DQUOTE && (flags & F_SHELLQUOTE) && *field == '\\' && strchr (slashify_in_quotes, field[1]) != 0)
|
||||
buf[b++] = *++field; /* backslash quoted double quote */
|
||||
else if (qstate == DQUOTE && *field == '"')
|
||||
{
|
||||
qstate = NQUOTE;
|
||||
if (flags & F_PRESERVE)
|
||||
buf[b++] = *field;
|
||||
}
|
||||
else if (qstate == NQUOTE && *field == *dstring)
|
||||
break;
|
||||
else
|
||||
/* This copies any text between a closing double quote and the
|
||||
delimiter. If you want to change that, make sure to do the
|
||||
copy only if qstate == DQUOTE. */
|
||||
buf[b++] = *field;
|
||||
}
|
||||
buf[b] = '\0';
|
||||
}
|
||||
else if ((flags & F_SHELLQUOTE) && *prev == '\'')
|
||||
{
|
||||
if (xbuf == 0)
|
||||
xbuf = xmalloc (strlen (prev) + 1);
|
||||
buf = xbuf;
|
||||
b = 0;
|
||||
if (flags & F_PRESERVE)
|
||||
buf[b++] = *prev;
|
||||
qstate = SQUOTE;
|
||||
for (field = ++prev; *field; field++)
|
||||
{
|
||||
if (qstate == SQUOTE && *field == '\'')
|
||||
{
|
||||
qstate = NQUOTE;
|
||||
if (flags & F_PRESERVE)
|
||||
buf[b++] = *field;
|
||||
}
|
||||
else if (qstate == NQUOTE && *field == *dstring)
|
||||
break;
|
||||
else
|
||||
/* This copies any text between a closing single quote and the
|
||||
delimiter. If you want to change that, make sure to do the
|
||||
copy only if qstate == SQUOTE. */
|
||||
buf[b++] = *field;
|
||||
}
|
||||
buf[b] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
buf = prev;
|
||||
field = prev + strcspn (prev, dstring);
|
||||
}
|
||||
|
||||
delim = *field;
|
||||
*field = '\0';
|
||||
|
||||
if ((flags & F_GREEDY) == 0 || buf[0])
|
||||
{
|
||||
bind_array_element (dsv, ind, buf, 0);
|
||||
ind++;
|
||||
}
|
||||
|
||||
*field = delim;
|
||||
|
||||
if (delim == *dstring)
|
||||
prev = field + 1;
|
||||
}
|
||||
while (delim == *dstring);
|
||||
|
||||
if (xbuf)
|
||||
free (xbuf);
|
||||
|
||||
return (rval = ind); /* number of fields */
|
||||
}
|
||||
|
||||
int
|
||||
dsv_builtin (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int opt, rval, flags;
|
||||
char *array_name, *dsvstring, *delims;
|
||||
SHELL_VAR *v;
|
||||
|
||||
array_name = 0;
|
||||
rval = EXECUTION_SUCCESS;
|
||||
|
||||
delims = ",";
|
||||
flags = 0;
|
||||
|
||||
reset_internal_getopt ();
|
||||
while ((opt = internal_getopt (list, "a:d:Sgp")) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'a':
|
||||
array_name = list_optarg;
|
||||
break;
|
||||
case 'd':
|
||||
delims = list_optarg;
|
||||
break;
|
||||
case 'S':
|
||||
flags |= F_SHELLQUOTE;
|
||||
break;
|
||||
case 'g':
|
||||
flags |= F_GREEDY;
|
||||
break;
|
||||
case 'p':
|
||||
flags |= F_PRESERVE;
|
||||
break;
|
||||
CASE_HELPOPT;
|
||||
default:
|
||||
builtin_usage ();
|
||||
return (EX_USAGE);
|
||||
}
|
||||
}
|
||||
list = loptend;
|
||||
|
||||
if (array_name == 0)
|
||||
array_name = DSV_ARRAY_DEFAULT;
|
||||
|
||||
if (legal_identifier (array_name) == 0)
|
||||
{
|
||||
sh_invalidid (array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
if (list == 0)
|
||||
{
|
||||
builtin_error ("dsv string argument required");
|
||||
return (EX_USAGE);
|
||||
}
|
||||
|
||||
v = find_or_make_array_variable (array_name, 1);
|
||||
if (v == 0 || readonly_p (v) || noassign_p (v))
|
||||
{
|
||||
if (v && readonly_p (v))
|
||||
err_readonly (array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
else if (array_p (v) == 0)
|
||||
{
|
||||
builtin_error ("%s: not an indexed array", array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
if (invisible_p (v))
|
||||
VUNSETATTR (v, att_invisible);
|
||||
array_flush (array_cell (v));
|
||||
|
||||
dsvstring = list->word->word;
|
||||
|
||||
if (dsvstring == 0 || *dsvstring == 0)
|
||||
return (EXECUTION_SUCCESS);
|
||||
|
||||
opt = dsvsplit (v, dsvstring, delims, flags);
|
||||
/* Maybe do something with OPT here, it's the number of fields */
|
||||
|
||||
return (rval);
|
||||
}
|
||||
|
||||
/* Called when builtin is enabled and loaded from the shared object. If this
|
||||
function returns 0, the load fails. */
|
||||
int
|
||||
dsv_builtin_load (name)
|
||||
char *name;
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
/* Called when builtin is disabled. */
|
||||
void
|
||||
dsv_builtin_unload (name)
|
||||
char *name;
|
||||
{
|
||||
}
|
||||
|
||||
char *dsv_doc[] = {
|
||||
"Read delimiter-separated fields from STRING.",
|
||||
"",
|
||||
"Parse STRING, a line of delimiter-separated values, into individual",
|
||||
"fields, and store them into the indexed array ARRAYNAME starting at",
|
||||
"index 0. The parsing understands and skips over double-quoted strings. ",
|
||||
"If ARRAYNAME is not supplied, \"DSV\" is the default array name.",
|
||||
"If the delimiter is a comma, the default, this parses comma-",
|
||||
"separated values as specified in RFC 4180.",
|
||||
"",
|
||||
"The -d option specifies the delimiter. The delimiter is the first",
|
||||
"character of the DELIMS argument. Specifying a DELIMS argument that",
|
||||
"contains more than one character is not supported and will produce",
|
||||
"unexpected results. The -S option enables shell-like quoting: double-",
|
||||
"quoted strings can contain backslashes preceding special characters,",
|
||||
"and the backslash will be removed; and single-quoted strings are",
|
||||
"processed as the shell would process them. The -g option enables a",
|
||||
"greedy split: sequences of the delimiter are skipped at the beginning",
|
||||
"and end of STRING, and consecutive instances of the delimiter in STRING",
|
||||
"do not generate empty fields. If the -p option is supplied, dsv leaves",
|
||||
"quote characters as part of the generated field; otherwise they are",
|
||||
"removed.",
|
||||
"",
|
||||
"The return value is 0 unless an invalid option is supplied or the ARRAYNAME",
|
||||
"argument is invalid or readonly.",
|
||||
(char *)NULL
|
||||
};
|
||||
|
||||
struct builtin dsv_struct = {
|
||||
"dsv", /* builtin name */
|
||||
dsv_builtin, /* function implementing the builtin */
|
||||
BUILTIN_ENABLED, /* initial flags for builtin */
|
||||
dsv_doc, /* array of long documentation strings. */
|
||||
"dsv [-a ARRAYNAME] [-d DELIMS] [-Sgp] string", /* usage synopsis; becomes short_doc */
|
||||
0 /* reserved for internal use */
|
||||
};
|
||||
@@ -3,7 +3,7 @@
|
||||
/* See Makefile for compilation details. */
|
||||
|
||||
/*
|
||||
Copyright (C) 2017,2018,2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2017-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash.
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
@@ -102,7 +102,7 @@ static const struct
|
||||
# define ALLFLAGS (O_APPEND|O_ASYNC|O_SYNC|O_NONBLOCK|O_FSYNC|O_DSYNC|\
|
||||
O_RSYNC|O_ALT_IO|O_DIRECT|O_NOATIME|O_NOSIGPIPE)
|
||||
|
||||
/* An unsed bit in the file status flags word we can use to pass around the
|
||||
/* An unused bit in the file status flags word we can use to pass around the
|
||||
state of close-on-exec. */
|
||||
# define O_CLOEXEC ((~ALLFLAGS) ^ ((~ALLFLAGS) & ((~ALLFLAGS) - 1)))
|
||||
#endif
|
||||
|
||||
@@ -228,7 +228,7 @@ char *mkdir_doc[] = {
|
||||
"a symbolic mode is used, the operations are interpreted relative to",
|
||||
"an initial mode of \"a=rwx\". The -p option causes any required",
|
||||
"intermediate directories in PATH to be created. The directories",
|
||||
"are created with permssion bits of rwxrwxrwx as modified by the current",
|
||||
"are created with permission bits of rwxrwxrwx as modified by the current",
|
||||
"umask, plus write and search permissions for the owner. mkdir",
|
||||
"returns 0 if the directories are created successfully, and non-zero",
|
||||
"if an error occurs.",
|
||||
|
||||
+6
-2
@@ -523,7 +523,7 @@ restore_signal_mask (set)
|
||||
#ifdef DEBUG
|
||||
/* A debugging function that can be called from gdb, for instance. */
|
||||
void
|
||||
open_files ()
|
||||
open_files (void)
|
||||
{
|
||||
register int i;
|
||||
int f, fd_table_size;
|
||||
@@ -2265,7 +2265,7 @@ coproc_setvars (cp)
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
char *namevar, *t;
|
||||
int l;
|
||||
size_t l;
|
||||
WORD_DESC w;
|
||||
#if defined (ARRAY_VARS)
|
||||
arrayind_t ind;
|
||||
@@ -3918,11 +3918,15 @@ execute_cond_node (cond)
|
||||
arg1 = nullstr;
|
||||
if (echo_command_at_execute)
|
||||
xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *)NULL);
|
||||
#if defined (ARRAY_VARS)
|
||||
if (varop)
|
||||
oa = set_expand_once (0, 0); /* no-op for compatibility levels <= 51 */
|
||||
#endif
|
||||
result = unary_test (cond->op->word, arg1, varflag) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
|
||||
#if defined (ARRAY_VARS)
|
||||
if (varop)
|
||||
assoc_expand_once = oa;
|
||||
#endif
|
||||
if (arg1 != nullstr)
|
||||
free (arg1);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ exec_name_should_ignore (name)
|
||||
|
||||
/* Return some flags based on information about this file.
|
||||
The EXISTS bit is non-zero if the file is found.
|
||||
The EXECABLE bit is non-zero the file is executble.
|
||||
The EXECABLE bit is non-zero the file is executable.
|
||||
Zero is returned if the file is not found. */
|
||||
int
|
||||
file_status (name)
|
||||
|
||||
@@ -1184,7 +1184,7 @@ Returns the old timeout value.
|
||||
@deftypefun int rl_set_timeout (unsigned int secs, unsigned int usecs)
|
||||
Set a timeout for subsequent calls to @code{readline()}. If Readline does
|
||||
not read a complete line, or the number of characters specified by
|
||||
@code{rl_num_chars_to_read}, before the duration specfied by @var{secs}
|
||||
@code{rl_num_chars_to_read}, before the duration specified by @var{secs}
|
||||
(in seconds) and @var{usecs} (microseconds), it returns and sets
|
||||
@code{RL_STATE_TIMEOUT} in @code{rl_readline_state}.
|
||||
Passing 0 for @code{secs} and @code{usecs} cancels any previously set
|
||||
|
||||
@@ -536,9 +536,12 @@ The default limit is @code{100}.
|
||||
If set to @samp{on}, Readline will convert characters with the
|
||||
eighth bit set to an @sc{ascii} key sequence by stripping the eighth
|
||||
bit and prefixing an @key{ESC} character, converting them to a
|
||||
meta-prefixed key sequence. The default value is @samp{on}, but
|
||||
meta-prefixed key sequence.
|
||||
The default value is @samp{on}, but
|
||||
will be set to @samp{off} if the locale is one that contains
|
||||
eight-bit characters.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
may change if the locale is changed.
|
||||
|
||||
@item disable-completion
|
||||
@vindex disable-completion
|
||||
@@ -649,6 +652,8 @@ regardless of what the terminal claims it can support. The
|
||||
default value is @samp{off}, but Readline will set it to @samp{on} if the
|
||||
locale contains eight-bit characters.
|
||||
The name @code{meta-flag} is a synonym for this variable.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
may change if the locale is changed.
|
||||
|
||||
@item isearch-terminators
|
||||
@vindex isearch-terminators
|
||||
@@ -731,6 +736,8 @@ eighth bit set directly rather than as a meta-prefixed escape
|
||||
sequence.
|
||||
The default is @samp{off}, but Readline will set it to @samp{on} if the
|
||||
locale contains eight-bit characters.
|
||||
This variable is dependent on the @code{LC_CTYPE} locale category, and
|
||||
may change if the locale is changed.
|
||||
|
||||
@item page-completions
|
||||
@vindex page-completions
|
||||
@@ -845,7 +852,7 @@ to a string that is inserted when the key is pressed (a @var{macro}).
|
||||
|
||||
@ifset BashFeatures
|
||||
The @w{@code{bind -p}} command displays Readline function names and
|
||||
bindings in a format that can put directly into an initialization file.
|
||||
bindings in a format that can be put directly into an initialization file.
|
||||
@xref{Bash Builtins}.
|
||||
@end ifset
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Copyright (C) 1988-2022 Free Software Foundation, Inc.
|
||||
@set EDITION 8.2
|
||||
@set VERSION 8.2
|
||||
|
||||
@set UPDATED 11 March 2022
|
||||
@set UPDATED-MONTH March 2022
|
||||
@set UPDATED 12 August 2022
|
||||
@set UPDATED-MONTH August 2022
|
||||
|
||||
@set LASTCHANGE Fri Mar 11 10:13:51 EST 2022
|
||||
@set LASTCHANGE Fri Aug 12 11:10:50 EDT 2022
|
||||
|
||||
+69
-16
@@ -57,6 +57,9 @@
|
||||
|
||||
static int utf8locale (char *);
|
||||
|
||||
#define RL_DEFAULT_LOCALE "C"
|
||||
static char *_rl_current_locale = 0;
|
||||
|
||||
#if !defined (HAVE_SETLOCALE)
|
||||
/* A list of legal values for the LANG or LC_CTYPE environment variables.
|
||||
If a locale name in this list is the value for the LC_ALL, LC_CTYPE,
|
||||
@@ -132,50 +135,61 @@ _rl_init_locale (void)
|
||||
that doesn't return anything, we set lspec to the empty string to
|
||||
force the subsequent call to setlocale() to define the `native'
|
||||
environment. */
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
if (lspec == 0 || *lspec == 0)
|
||||
lspec = setlocale (LC_CTYPE, (char *)NULL);
|
||||
if (lspec == 0)
|
||||
lspec = "";
|
||||
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
|
||||
#else
|
||||
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
|
||||
#endif
|
||||
|
||||
_rl_utf8locale = (ret && *ret) ? utf8locale (ret) : 0;
|
||||
|
||||
_rl_current_locale = savestring (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value
|
||||
to decide the defaults for 8-bit character input and output. Returns
|
||||
1 if we set eight-bit mode. */
|
||||
int
|
||||
_rl_init_eightbit (void)
|
||||
{
|
||||
/* If we have setlocale(3), just check the current LC_CTYPE category
|
||||
value, and go into eight-bit mode if it's not C or POSIX. */
|
||||
value (passed as LOCALESTR), and go into eight-bit mode if it's not "C"
|
||||
or "POSIX". If FORCE is non-zero, we reset the locale variables to values
|
||||
appropriate for the C locale if the locale is "C" or "POSIX". FORCE is 0
|
||||
when this is called from _rl_init_eightbit, since we're modifying the
|
||||
default initial values and don't need to change anything else. If we
|
||||
don't have setlocale(3), we check the codeset portion of LOCALESTR against
|
||||
a set of known values and go into eight-bit mode if it matches one of those.
|
||||
Returns 1 if we set eight-bit (multibyte) mode. */
|
||||
static int
|
||||
_rl_set_localevars (char *localestr, int force)
|
||||
{
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
char *lspec, *t;
|
||||
|
||||
t = _rl_init_locale (); /* returns static pointer */
|
||||
|
||||
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
|
||||
if (localestr && *localestr && (localestr[0] != 'C' || localestr[1]) && (STREQ (localestr, "POSIX") == 0))
|
||||
{
|
||||
_rl_meta_flag = 1;
|
||||
_rl_convert_meta_chars_to_ascii = 0;
|
||||
_rl_output_meta_chars = 1;
|
||||
return (1);
|
||||
}
|
||||
else if (force)
|
||||
{
|
||||
/* Default "C" locale settings. */
|
||||
_rl_meta_flag = 0;
|
||||
_rl_convert_meta_chars_to_ascii = 1;
|
||||
_rl_output_meta_chars = 0;
|
||||
return (0);
|
||||
}
|
||||
else
|
||||
return (0);
|
||||
|
||||
#else /* !HAVE_SETLOCALE */
|
||||
char *lspec, *t;
|
||||
char *t;
|
||||
int i;
|
||||
|
||||
/* We don't have setlocale. Finesse it. Check the environment for the
|
||||
appropriate variables and set eight-bit mode if they have the right
|
||||
values. */
|
||||
lspec = _rl_get_locale_var ("LC_CTYPE");
|
||||
|
||||
if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
|
||||
if (localestr == 0 || (t = normalize_codeset (localestr)) == 0)
|
||||
return (0);
|
||||
for (i = 0; t && legal_lang_values[i]; i++)
|
||||
if (STREQ (t, legal_lang_values[i]))
|
||||
@@ -186,6 +200,14 @@ _rl_init_eightbit (void)
|
||||
break;
|
||||
}
|
||||
|
||||
if (force && legal_lang_values[i] == 0) /* didn't find it */
|
||||
{
|
||||
/* Default "C" locale settings. */
|
||||
_rl_meta_flag = 0;
|
||||
_rl_convert_meta_chars_to_ascii = 1;
|
||||
_rl_output_meta_chars = 0;
|
||||
}
|
||||
|
||||
_rl_utf8locale = *t ? STREQ (t, "utf8") : 0;
|
||||
|
||||
xfree (t);
|
||||
@@ -193,6 +215,21 @@ _rl_init_eightbit (void)
|
||||
#endif /* !HAVE_SETLOCALE */
|
||||
}
|
||||
|
||||
/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value
|
||||
to decide the defaults for 8-bit character input and output. Returns
|
||||
1 if we set eight-bit mode. */
|
||||
int
|
||||
_rl_init_eightbit (void)
|
||||
{
|
||||
char *t, *ol;
|
||||
|
||||
ol = _rl_current_locale;
|
||||
t = _rl_init_locale (); /* resets _rl_current_locale, returns static pointer */
|
||||
xfree (ol);
|
||||
|
||||
return (_rl_set_localevars (t, 0));
|
||||
}
|
||||
|
||||
#if !defined (HAVE_SETLOCALE)
|
||||
static char *
|
||||
normalize_codeset (char *codeset)
|
||||
@@ -289,3 +326,19 @@ find_codeset (char *name, size_t *lenp)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
_rl_reset_locale (void)
|
||||
{
|
||||
char *ol, *nl;
|
||||
|
||||
/* This should not be NULL; _rl_init_eightbit sets it on the first call to
|
||||
readline() or rl_initialize(). */
|
||||
ol = _rl_current_locale;
|
||||
nl = _rl_init_locale (); /* resets _rl_current_locale */
|
||||
|
||||
if ((ol == 0 && nl) || (ol && nl && (STREQ (ol, nl) == 0)))
|
||||
(void)_rl_set_localevars (nl, 1);
|
||||
|
||||
xfree (ol);
|
||||
}
|
||||
|
||||
@@ -1186,7 +1186,7 @@ rl_initialize (void)
|
||||
RL_SETSTATE(RL_STATE_INITIALIZED);
|
||||
}
|
||||
else
|
||||
(void)_rl_init_locale (); /* check current locale */
|
||||
_rl_reset_locale (); /* check current locale and set locale variables */
|
||||
|
||||
/* Initialize the current line information. */
|
||||
_rl_init_line_state ();
|
||||
|
||||
@@ -364,6 +364,7 @@ extern void _rl_revert_all_lines (void);
|
||||
/* nls.c */
|
||||
extern char *_rl_init_locale (void);
|
||||
extern int _rl_init_eightbit (void);
|
||||
extern void _rl_reset_locale (void);
|
||||
|
||||
/* parens.c */
|
||||
extern void _rl_enable_paren_matching (int);
|
||||
|
||||
+15
-7
@@ -1,6 +1,6 @@
|
||||
/* setlinebuf.c - line-buffer a stdio stream. */
|
||||
|
||||
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997,2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -25,31 +25,39 @@
|
||||
#include <xmalloc.h>
|
||||
|
||||
#if defined (USING_BASH_MALLOC)
|
||||
# define LBUF_BUFSIZE 1008
|
||||
# define LBUF_BUFSIZE 2016
|
||||
#else
|
||||
# define LBUF_BUFSIZE BUFSIZ
|
||||
#endif
|
||||
|
||||
static char *stdoutbuf = 0;
|
||||
static char *stderrbuf = 0;
|
||||
|
||||
/* Cause STREAM to buffer lines as opposed to characters or blocks. */
|
||||
int
|
||||
sh_setlinebuf (stream)
|
||||
FILE *stream;
|
||||
{
|
||||
char *local_linebuf;
|
||||
|
||||
#if !defined (HAVE_SETLINEBUF) && !defined (HAVE_SETVBUF)
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_SETVBUF)
|
||||
char *local_linebuf;
|
||||
|
||||
#if defined (USING_BASH_MALLOC)
|
||||
local_linebuf = (char *)xmalloc (LBUF_BUFSIZE);
|
||||
if (stream == stdout && stdoutbuf == 0)
|
||||
local_linebuf = stdoutbuf = (char *)xmalloc (LBUF_BUFSIZE);
|
||||
else if (stream == stderr && stderrbuf == 0)
|
||||
local_linebuf = stderrbuf = (char *)xmalloc (LBUF_BUFSIZE);
|
||||
else
|
||||
local_linebuf = (char *)NULL; /* let stdio handle it */
|
||||
#else
|
||||
local_linebuf = (char *)NULL;
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_SETVBUF)
|
||||
return (setvbuf (stream, local_linebuf, _IOLBF, LBUF_BUFSIZE));
|
||||
# else /* !HAVE_SETVBUF */
|
||||
#else /* !HAVE_SETVBUF */
|
||||
|
||||
setlinebuf (stream);
|
||||
return (0);
|
||||
|
||||
@@ -1666,7 +1666,7 @@ rewind_input_string ()
|
||||
xchars++;
|
||||
|
||||
/* XXX - how to reflect bash_input.location.string back to string passed to
|
||||
parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
|
||||
parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
|
||||
far into the string we parsed. parse_and_execute knows where bash_input.
|
||||
location.string is, and how far from orig_string that is -- that's the
|
||||
number of characters the command consumed. */
|
||||
@@ -3303,7 +3303,7 @@ reset_parser ()
|
||||
|
||||
#if defined (EXTENDED_GLOB)
|
||||
/* Reset to global value of extended glob */
|
||||
if (parser_state & PST_EXTPAT)
|
||||
if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
|
||||
extended_glob = global_extglob;
|
||||
#endif
|
||||
|
||||
@@ -3328,6 +3328,11 @@ reset_parser ()
|
||||
|
||||
eol_ungetc_lookahead = 0;
|
||||
|
||||
/* added post-bash-5.1 */
|
||||
need_here_doc = 0;
|
||||
redir_stack[0] = 0;
|
||||
esacs_needed_count = expecting_in_token = 0;
|
||||
|
||||
current_token = '\n'; /* XXX */
|
||||
last_read_token = '\n';
|
||||
token_to_read = '\n';
|
||||
@@ -4098,6 +4103,7 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
saved_global = global_command; /* might not be necessary */
|
||||
global_command = (COMMAND *)NULL;
|
||||
|
||||
/* These are reset by reset_parser() */
|
||||
need_here_doc = 0;
|
||||
esacs_needed_count = expecting_in_token = 0;
|
||||
|
||||
@@ -4107,9 +4113,13 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
backwards compatibility. */
|
||||
if (expand_aliases)
|
||||
expand_aliases = posixly_correct != 0;
|
||||
#if defined (EXTENDED_GLOB)
|
||||
global_extglob = extended_glob;
|
||||
if (shell_compatibility_level <= 51)
|
||||
extended_glob = 1;
|
||||
#endif
|
||||
|
||||
current_token = '\n'; /* XXX */
|
||||
|
||||
token_to_read = DOLPAREN; /* let's trick the parser */
|
||||
|
||||
r = yyparse ();
|
||||
@@ -4120,11 +4130,20 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
gather_here_documents (); /* XXX check compatibility level? */
|
||||
}
|
||||
|
||||
#if defined (EXTENDED_GLOB)
|
||||
extended_glob = global_extglob;
|
||||
#endif
|
||||
|
||||
parsed_command = global_command;
|
||||
|
||||
if (EOF_Reached)
|
||||
/* yyparse() has already called yyerror() */
|
||||
return (&matched_pair_error);
|
||||
{
|
||||
shell_eof_token = ps.eof_token;
|
||||
expand_aliases = ps.expand_aliases;
|
||||
|
||||
/* yyparse() has already called yyerror() and reset_parser() */
|
||||
return (&matched_pair_error);
|
||||
}
|
||||
else if (r != 0)
|
||||
{
|
||||
/* parser_error (start_lineno, _("could not parse command substitution")); */
|
||||
@@ -4135,13 +4154,26 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
if (interactive_shell == 0)
|
||||
jump_to_top_level (FORCE_EOF); /* This is like reader_loop() */
|
||||
else
|
||||
jump_to_top_level (DISCARD);
|
||||
{
|
||||
shell_eof_token = ps.eof_token;
|
||||
expand_aliases = ps.expand_aliases;
|
||||
|
||||
jump_to_top_level (DISCARD);
|
||||
}
|
||||
}
|
||||
|
||||
if (current_token != shell_eof_token)
|
||||
{
|
||||
INTERNAL_DEBUG(("current_token (%d) != shell_eof_token (%c)", current_token, shell_eof_token));
|
||||
token_to_read = current_token;
|
||||
|
||||
/* If we get here we can check eof_encountered and if it's 1 but the
|
||||
previous EOF_Reached test didn't succeed, we can assume that the shell
|
||||
is interactive and ignoreeof is set. We might want to restore the
|
||||
parser state in this case. */
|
||||
shell_eof_token = ps.eof_token;
|
||||
expand_aliases = ps.expand_aliases;
|
||||
|
||||
return (&matched_pair_error);
|
||||
}
|
||||
|
||||
@@ -4226,6 +4258,9 @@ xparse_dolparen (base, string, indp, flags)
|
||||
command substitution and we want to defer it completely until then. The
|
||||
old value will be restored by restore_parser_state(). */
|
||||
expand_aliases = 0;
|
||||
#if defined (EXTENDED_GLOB)
|
||||
global_extglob = extended_glob;
|
||||
#endif
|
||||
|
||||
token_to_read = DOLPAREN; /* let's trick the parser */
|
||||
|
||||
@@ -4236,7 +4271,7 @@ xparse_dolparen (base, string, indp, flags)
|
||||
if (current_token == shell_eof_token)
|
||||
yyclearin; /* might want to clear lookahead token unconditionally */
|
||||
|
||||
reset_parser ();
|
||||
reset_parser (); /* resets extended_glob too */
|
||||
/* reset_parser() clears shell_input_line and associated variables, including
|
||||
parser_state, so we want to reset things, then restore what we need. */
|
||||
restore_input_line_state (&ls);
|
||||
|
||||
Binary file not shown.
+442
-402
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+442
-402
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+1623
-966
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+15
-16
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Project-Id-Version: bash 5.2-rc1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-11 14:50-0500\n"
|
||||
"PO-Revision-Date: 2022-06-21 01:04+0800\n"
|
||||
"PO-Revision-Date: 2022-07-28 01:08+0800\n"
|
||||
"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
|
||||
"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
|
||||
"Language: zh_TW\n"
|
||||
@@ -20,7 +20,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.1\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
|
||||
#: arrayfunc.c:66
|
||||
msgid "bad array subscript"
|
||||
@@ -4399,26 +4399,25 @@ msgid ""
|
||||
msgstr ""
|
||||
"顯示指令類型的資訊。\n"
|
||||
" \n"
|
||||
" 對於每一個 <名稱>,指示如果做為指令它將如何被解釋。\n"
|
||||
" 對於每一個 NAME,指示用作指令名稱時的解釋方式。\n"
|
||||
" \n"
|
||||
" 選項:\n"
|
||||
" -a\t顯示所有包含名稱為 <名稱> 的可執行檔案的位置;\n"
|
||||
" \t包括別名、內建和函數。僅當「-p」選項沒有使用時\n"
|
||||
" -a\t顯示所有包含名為 NAME 的可執行檔案的位置。\n"
|
||||
" \t包括別名、內建和函數(若且唯若 “-p” 選項未使用時)。\n"
|
||||
" -f\t抑制 shell 函數查詢\n"
|
||||
" -P\t為每個 <名稱> 驚醒 PATH 路徑搜尋,即使它是別名、\n"
|
||||
" \t內建或函數,並且回傳將被執行的磁碟上檔案的名稱。\n"
|
||||
" -p\t回傳將被執行的磁碟上檔案的名稱,或者當「type -t <名稱>」\n"
|
||||
" \t不回傳「file」時,不回傳任何值。\n"
|
||||
" -t\t回傳下列詞中的任何一個「alias」、「keyword」、\n"
|
||||
" \t「function」、「builtin」、「file」或者「」,如果 <名稱> 是相應的\n"
|
||||
" \t一個別名、shell 保留字、shell 函數、shell 內建命令、\n"
|
||||
" \t磁碟檔案或沒有找到。\n"
|
||||
" -P\t為每個 NAME 強制進行 PATH 路徑搜尋,即使它是別名、\n"
|
||||
" \t內建或函數,並回傳將被執行的磁碟檔案名稱。\n"
|
||||
" -p\t回傳將被執行的磁碟上檔案的名稱,或者在 “type -t NAME”\n"
|
||||
" \t回傳值不是 “file” 時,不回傳任何值。\n"
|
||||
" -t\t回傳 “alias”、“keyword”、“function”、“builtin”、“file”\n"
|
||||
" \t或 “”,對應到 NAME 是別名、shell 保留字、shell 函數、\n"
|
||||
" \t內建命令、磁碟檔案或找不到檔案。\n"
|
||||
" \n"
|
||||
" 參數:\n"
|
||||
" <名稱>\t將要解析的指令。\n"
|
||||
" 引數:\n"
|
||||
" NAME\t將要解析的指令。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 如果所有的 <名稱> 指令都找到則回傳成功;任何找不到則失敗。"
|
||||
" 若找到所有的 NAME,則回傳成功;有任何一個沒找到,則回傳失敗。"
|
||||
|
||||
#: builtins.c:1432
|
||||
msgid ""
|
||||
|
||||
+1
-1
@@ -304,7 +304,7 @@ make_command_string_internal (command)
|
||||
if (deferred_heredocs == 0)
|
||||
{
|
||||
if (was_heredoc == 0)
|
||||
cprintf (s); /* inside_function_def? */
|
||||
cprintf ("%s", s); /* inside_function_def? */
|
||||
else
|
||||
was_heredoc = 0;
|
||||
}
|
||||
|
||||
@@ -8627,7 +8627,7 @@ valid_parameter_transform (xform)
|
||||
case 'P': /* expand like prompt string */
|
||||
case 'Q': /* quote reusably */
|
||||
case 'U': /* transform to uppercase */
|
||||
case 'u': /* tranform by capitalizing */
|
||||
case 'u': /* transform by capitalizing */
|
||||
case 'L': /* transform to lowercase */
|
||||
return 1;
|
||||
default:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user