- time_command: make usage of the various preprocessor defines that
determine how we measure the command's duration consistent
From andrew@andrewoates.com
+
+variables.c
+ - make_local_variable: if we inherit the export attribute from an
+ existing variable at a previous scope, set array_needs_making
+ Report from Grisha Levit <grishalevit@gmail.com>
+
+builtins/help.def
+ - help_builtin: treat each pattern individually; print one message per
+ glob pattern instead of printing a comma-separated list of all
+ patterns and print a potential error message once per failing
+ pattern
+ - help_builtin: suggest using man or info only if the pattern is not
+ a glob pattern
+ Suggestion from Martin D Kealey <martin@kurahaupo.gen.nz>
+
+ 11/17
+ -----
+sig.c
+ - NEED_FPURGE_DECL: add before including externs.h, since we now call
+ fpurge
+ Report by Emanuele Torre <torreemanuele6@gmail.com>
+
+doc/bash.1,doc/bashref.texi
+ - fix some options typeset in the wrong font
+ Report and patch from Grisha Levit <grishalevit@gmail.com>
int
help_builtin (WORD_LIST *list)
{
- register int i;
+ int i;
char *pattern, *name;
- int match_found, sflag, dflag, mflag, m, pass, this_found;
+ int match_found, sflag, dflag, mflag, m, pass, this_found, globpat;
size_t plen;
dflag = sflag = mflag = 0;
/* We should consider making `help bash' do something. */
- if (glob_pattern_p (list->word->word) == 1)
- {
- printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
- print_word_list (list, ", ");
- printf ("%s", _("'\n\n"));
- }
-
for (match_found = 0, pattern = ""; list; list = list->next)
{
pattern = list->word->word;
plen = strlen (pattern);
+ globpat = glob_pattern_p (pattern);
+ if (globpat)
+ printf (_("Shell commands matching pattern '%s':\n\n"), pattern);
+
for (pass = 1, this_found = 0; pass < 3; pass++)
{
for (i = 0; name = shell_builtins[i].name; i++)
if (pass == 1 && this_found == 1)
break;
}
+ if (this_found == 0)
+ {
+ if (globpat)
+ builtin_error (_("no help topics match '%s'."), pattern);
+ else
+ builtin_error (_("no help topics match '%s'. Try 'help help', 'man -k %s', or 'info %s'."), pattern, pattern, pattern);
+ }
}
- if (match_found == 0)
- {
- builtin_error (_("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."), pattern, pattern, pattern);
- return (EXECUTION_FAILURE);
- }
-
- return (sh_chkwrite (EXECUTION_SUCCESS));
+ return (match_found ? sh_chkwrite (EXECUTION_SUCCESS) : sh_chkwrite (EXECUTION_FAILURE));
}
void
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Mon Oct 6 09:57:24 EDT 2025
+.\" Last Change: Mon Nov 17 11:37:04 EST 2025
.\"
.\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section
.\" For rbash, strip all but "RESTRICTED SHELL" section
.ds zX \" empty
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2025 October 6" "GNU Bash 5.3"
+.TH BASH 1 "2025 November 17" "GNU Bash 5.3"
.\"
.ie \n(.g \{\
.ds ' \(aq
.PP
The options supplied to \fBcomplete\fP and \fBcompopt\fP
can control how \fBreadline\fP treats the completions.
-For instance, the \fI\-o fullquote\fP option tells \fBreadline\fP
+For instance, the \fB\-o fullquote\fP option tells \fBreadline\fP
to quote the matches as if they were filenames.
See the description of \fBcomplete\fP below
for details.
.PP
All builtins except
\fB:\fP, \fBtrue\fP, \fBfalse\fP, \fBecho\fP, and \fBtest\fP/\fB[\fP
-accept \fB--help\fP as a special option.
-If \fB--help\fP is supplied, these builtins output
+accept \fB\-\-help\fP as a special option.
+If \fB\-\-help\fP is supplied, these builtins output
a help message and exit with a status of 0.
.PP
.PD 0
The
.B \-d
option will delete a builtin previously loaded with \fB\-f\fP.
-If \fI\-s\fP is used with \fI\-f\fP, the new builtin becomes a
+If \fB\-s\fP is used with \fB\-f\fP, the new builtin becomes a
.SM POSIX
special builtin.
.IP
.PD
.RE
.IP
-If the top element of the directory stack is modified, and
-the \fI\-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP
+If the top element of the directory stack is modified,
+and the \fB\-n\fP option was not supplied,
+\fBpopd\fP uses the \fBcd\fP
builtin to change to the directory at the top of the stack.
If the \fBcd\fP fails, \fBpopd\fP returns a non-zero value.
.IP
The @option{-f} option means to load the new builtin command @var{name}
from shared object @var{filename}, on systems that support dynamic loading.
-If @var{filename} does not contain a slash.
+If @var{filename} does not contain a slash,
Bash will use the value of the @env{BASH_LOADABLES_PATH} variable as a
colon-separated list of directories in which to search for @var{filename}.
The default for @env{BASH_LOADABLES_PATH} is system-dependent,
list printed by @code{dirs}), starting with zero, from the stack.
@end table
-If the top element of the directory stack is modified, and
-the @option{-n} option was not supplied, @code{popd} uses the @code{cd}
+If the top element of the directory stack is modified,
+and the @option{-n} option was not supplied,
+@code{popd} uses the @code{cd}
builtin to change to the directory at the top of the stack.
If the @code{cd} fails, @code{popd} returns a non-zero value.
Copyright (C) 1988-2025 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Wed Sep 24 09:35:21 EDT 2025
+@set LASTCHANGE Mon Nov 17 11:37:24 EST 2025
@set EDITION 5.3
@set VERSION 5.3
-@set UPDATED 24 September 2025
-@set UPDATED-MONTH September 2025
+@set UPDATED 17 November 2025
+@set UPDATED-MONTH November 2025
c = GEQ;
else if ((c == LT) && (c1 == EQ))
c = LEQ;
+ else if ((c == '&') && (c1 == '&'))
+ c = LAND;
+ else if ((c == '|') && (c1 == '|'))
+ c = LOR;
else if ((c == '*') && (c1 == '*'))
c = POWER;
else if ((c == '-' || c == '+') && c1 == c && curtok == STR)
# endif /* HAVE_SYS_PTE_H */
#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
+#include <errno.h>
#include <stdio.h>
/* Return the fd from which we are actually getting input. */
#include "bashintl.h"
+#define NEED_FPURGE_DECL
+
#include "shell.h"
#include "execute_cmd.h"
#if defined (JOB_CONTROL)
Returns success unless N is negative or greater than $#.
builtin: builtin [shell-builtin [arg ...]]
shift: shift [n]
-Shell commands matching keyword `read*'
+Shell commands matching pattern 'read*':
read: read [-Eers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
readarray: readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
getopts optstring name [arg ...] while COMMANDS; do COMMANDS-2; done
hash [-lr] [-p pathname] [-dt] [name > { COMMANDS ; }
help [-dms] [pattern ...]
-./builtins10.sub: line 39: help: no help topics match `bash'. Try `help help' or `man -k bash' or `info bash'.
+./builtins10.sub: line 39: help: no help topics match 'bash'. Try 'help help', 'man -k bash', or 'info bash'.
builtins11.sub
unlimited
unlimited
else
/* We inherit the export attribute, but no others. */
new_var->attributes = exported_p (old_var) ? att_exported : 0;
+
+ if (exported_p (new_var))
+ array_needs_making = 1;
}
set_local_var_flags: