mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-23 13:57:58 +02:00
fix for fdflags loadable builtin; new strptime loadable builtin; enable -f doesn't fall back to current directory if using BASH_LOADABLES_PATH; new operator for rl_complete_internal that just dumps possible completions
This commit is contained in:
@@ -6705,6 +6705,9 @@ trap.c
|
||||
- _run_trap_internal,run_exit_trap: save and restore BASH_TRAPSIG;
|
||||
make sure it's set appropriately
|
||||
|
||||
doc/bash.1,doc/bashref.texi
|
||||
- BASH_TRAPSIG: document
|
||||
|
||||
builtins/declare.def
|
||||
- declare_internal: if declare is supplied -f and an argument that
|
||||
looks like an assignment statement, fail only if there is not a
|
||||
@@ -7995,3 +7998,34 @@ builtins/enable.def
|
||||
slash in BASH_LOADABLES_PATH, convert it to a pathname with a slash
|
||||
before calling dlopen, to force the loader to look in the current
|
||||
directory (Linux, for example, will not).
|
||||
|
||||
11/14
|
||||
-----
|
||||
examples/loadables/fdflags.c
|
||||
- fdflags_builtin: only parse the setspec once, since parsing uses
|
||||
strtok.
|
||||
Report and patch from Emanuele Torre <torreemanuele6@gmail.com>
|
||||
|
||||
11/15
|
||||
-----
|
||||
builtins/enable.def
|
||||
- dyn_load_builtin: if BASH_LOADABLES_PATH is set, use only it: don't
|
||||
fall back to looking in the current directory. This changes the
|
||||
historical behavior and brings the path behavior more in line with
|
||||
PATH, but not CDPATH.
|
||||
|
||||
11/20
|
||||
-----
|
||||
lib/readline/complete.c
|
||||
- rl_complete_internal: add `|' as a character for rl_complete_internal
|
||||
that also just displays the completions, since `%' is overloaded by
|
||||
rl_menu_complete
|
||||
|
||||
11/23
|
||||
-----
|
||||
examples/loadables/strptime.c
|
||||
- strptime: new loadable builtin, interface to strptime(3). Takes a
|
||||
date-time string as its arguments and tries to parse it according
|
||||
to a number of built-in formats. If successful, it outputs the
|
||||
result as a number of seconds since the epoch. Understands some
|
||||
handy shorthands like "now" and "tomorrow".
|
||||
|
||||
@@ -338,6 +338,7 @@ lib/malloc/trace.c f
|
||||
lib/malloc/watch.c f
|
||||
lib/malloc/xmalloc.c f
|
||||
lib/malloc/xleaktrace f 755
|
||||
lib/malloc/sbrk.c f
|
||||
lib/malloc/stub.c f
|
||||
lib/malloc/i386-alloca.s f
|
||||
lib/malloc/x386-alloca.s f
|
||||
@@ -767,6 +768,7 @@ examples/loadables/seq.c f
|
||||
examples/loadables/setpgid.c f
|
||||
examples/loadables/sleep.c f
|
||||
examples/loadables/strftime.c f
|
||||
examples/loadables/strptime.c f
|
||||
examples/loadables/truefalse.c f
|
||||
examples/loadables/getconf.h f
|
||||
examples/loadables/getconf.c f
|
||||
|
||||
Vendored
+37
@@ -2188,6 +2188,43 @@ main(int c, char **v)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASH_FUNC_BRK],
|
||||
[
|
||||
AC_MSG_CHECKING([for brk])
|
||||
AC_CACHE_VAL(ac_cv_func_brk,
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <unistd.h>]],
|
||||
[[ void *x = brk (0); ]])],
|
||||
[ac_cv_func_brk=yes],[ac_cv_func_brk=no])])
|
||||
AC_MSG_RESULT($ac_cv_func_brk)
|
||||
if test X$ac_cv_func_brk = Xyes; then
|
||||
AC_CACHE_CHECK([for working brk], [bash_cv_func_brk],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(int c, char **v)
|
||||
{
|
||||
void *x;
|
||||
|
||||
x = brk (0);
|
||||
exit ((x == (void *)-1) ? 1 : 0);
|
||||
}
|
||||
]])],[bash_cv_func_brk=yes],[bash_cv_func_brk=no],[AC_MSG_WARN([cannot check working brk if cross-compiling])
|
||||
bash_cv_func_brk=yes
|
||||
])])
|
||||
if test $bash_cv_func_brk = no; then
|
||||
ac_cv_func_brk=no
|
||||
fi
|
||||
fi
|
||||
if test $ac_cv_func_brk = yes; then
|
||||
AC_DEFINE(HAVE_BRK, 1,
|
||||
[Define if you have a working brk function.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(BASH_FUNC_FNMATCH_EQUIV_FALLBACK,
|
||||
[AC_MSG_CHECKING(whether fnmatch can be used to check bracket equivalence classes)
|
||||
AC_CACHE_VAL(bash_cv_fnmatch_equiv_fallback,
|
||||
|
||||
+18
-24
@@ -347,38 +347,32 @@ dyn_load_builtin (WORD_LIST *list, int flags, char *filename)
|
||||
#define RTLD_LAZY 1
|
||||
#endif
|
||||
|
||||
handle = 0;
|
||||
if (absolute_program (filename) == 0)
|
||||
{
|
||||
loadables_path = path_value ("BASH_LOADABLES_PATH", 1);
|
||||
if (loadables_path)
|
||||
{
|
||||
load_path = find_in_path (filename, loadables_path, FS_NODIRS|FS_EXEC_PREFERRED);
|
||||
if (load_path)
|
||||
{
|
||||
#if defined (_AIX)
|
||||
handle = dlopen (load_path, RTLD_NOW|RTLD_GLOBAL);
|
||||
# define DLFLAGS (RTLD_NOW|RTLD_GLOBAL)
|
||||
#else
|
||||
handle = dlopen (load_path, RTLD_LAZY);
|
||||
# define DLFLAGS RTLD_LAZY
|
||||
#endif /* !_AIX */
|
||||
free (load_path);
|
||||
}
|
||||
|
||||
handle = 0;
|
||||
if (absolute_program (filename))
|
||||
handle = dlopen (filename, DLFLAGS);
|
||||
else if (loadables_path = path_value ("BASH_LOADABLES_PATH", 1))
|
||||
{
|
||||
/* If we have a loadables path, don't fall back to the current directory. */
|
||||
load_path = find_in_path (filename, loadables_path, FS_NODIRS|FS_EXEC_PREFERRED);
|
||||
if (load_path)
|
||||
{
|
||||
handle = dlopen (load_path, DLFLAGS);
|
||||
free (load_path);
|
||||
}
|
||||
}
|
||||
|
||||
/* Fall back to current directory for now */
|
||||
if (handle == 0)
|
||||
else /* no loadables path, look in current directory */
|
||||
{
|
||||
char *openname;
|
||||
|
||||
openname = absolute_program (filename) ? filename : make_absolute (filename, ".");
|
||||
#if defined (_AIX)
|
||||
handle = dlopen (openname, RTLD_NOW|RTLD_GLOBAL);
|
||||
#else
|
||||
handle = dlopen (openname, RTLD_LAZY);
|
||||
#endif /* !_AIX */
|
||||
if (openname != filename)
|
||||
free (openname);
|
||||
openname = make_absolute (filename, ".");
|
||||
handle = dlopen (openname, DLFLAGS);
|
||||
free (openname);
|
||||
}
|
||||
|
||||
if (handle == 0)
|
||||
|
||||
@@ -480,6 +480,8 @@
|
||||
/* Define if you have <linux/audit.h> and it defines AUDIT_USER_TTY */
|
||||
#undef HAVE_DECL_AUDIT_USER_TTY
|
||||
|
||||
#undef HAVE_DECL_BRK
|
||||
|
||||
#undef HAVE_DECL_CONFSTR
|
||||
|
||||
#undef HAVE_DECL_PRINTF
|
||||
@@ -574,6 +576,9 @@
|
||||
/* Define if you have the bcopy function. */
|
||||
#undef HAVE_BCOPY
|
||||
|
||||
/* Define if you have the brk function. */
|
||||
#undef HAVE_BRK
|
||||
|
||||
/* Define if you have the bzero function. */
|
||||
#undef HAVE_BZERO
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.3, version 5.057.
|
||||
# From configure.ac for Bash 5.3, version 5.059.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for bash 5.3-devel.
|
||||
#
|
||||
@@ -15848,6 +15848,15 @@ else $as_nop
|
||||
fi
|
||||
printf "%s\n" "#define HAVE_DECL_PRINTF $ac_have_decl" >>confdefs.h
|
||||
|
||||
ac_fn_check_decl "$LINENO" "brk" "ac_cv_have_decl_brk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||
if test "x$ac_cv_have_decl_brk" = xyes
|
||||
then :
|
||||
ac_have_decl=1
|
||||
else $as_nop
|
||||
ac_have_decl=0
|
||||
fi
|
||||
printf "%s\n" "#define HAVE_DECL_BRK $ac_have_decl" >>confdefs.h
|
||||
|
||||
ac_fn_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||
if test "x$ac_cv_have_decl_sbrk" = xyes
|
||||
then :
|
||||
@@ -15922,7 +15931,7 @@ else $as_nop
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
long double r; char *foo, bar; r = strtold(foo, &bar);
|
||||
long double r; char *foo, *bar; r = strtold(foo, &bar);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -20099,6 +20108,89 @@ printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for brk" >&5
|
||||
printf %s "checking for brk... " >&6; }
|
||||
if test ${ac_cv_func_brk+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
void *x = brk (0);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_func_brk=yes
|
||||
else $as_nop
|
||||
ac_cv_func_brk=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_brk" >&5
|
||||
printf "%s\n" "$ac_cv_func_brk" >&6; }
|
||||
if test X$ac_cv_func_brk = Xyes; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working brk" >&5
|
||||
printf %s "checking for working brk... " >&6; }
|
||||
if test ${bash_cv_func_brk+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
if test "$cross_compiling" = yes
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working brk if cross-compiling" >&5
|
||||
printf "%s\n" "$as_me: WARNING: cannot check working brk if cross-compiling" >&2;}
|
||||
bash_cv_func_brk=yes
|
||||
|
||||
else $as_nop
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(int c, char **v)
|
||||
{
|
||||
void *x;
|
||||
|
||||
x = brk (0);
|
||||
exit ((x == (void *)-1) ? 1 : 0);
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"
|
||||
then :
|
||||
bash_cv_func_brk=yes
|
||||
else $as_nop
|
||||
bash_cv_func_brk=no
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_brk" >&5
|
||||
printf "%s\n" "$bash_cv_func_brk" >&6; }
|
||||
if test $bash_cv_func_brk = no; then
|
||||
ac_cv_func_brk=no
|
||||
fi
|
||||
fi
|
||||
if test $ac_cv_func_brk = yes; then
|
||||
|
||||
printf "%s\n" "#define HAVE_BRK 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
|
||||
printf %s "checking for the existence of strsignal... " >&6; }
|
||||
if test ${bash_cv_have_strsignal+y}
|
||||
|
||||
+4
-2
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_REVISION([for Bash 5.3, version 5.057])dnl
|
||||
AC_REVISION([for Bash 5.3, version 5.059])dnl
|
||||
|
||||
define(bashvers, 5.3)
|
||||
define(relstatus, devel)
|
||||
@@ -884,6 +884,7 @@ AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include <linux/audit.h>]])
|
||||
|
||||
AC_CHECK_DECLS([confstr])
|
||||
AC_CHECK_DECLS([printf])
|
||||
AC_CHECK_DECLS([brk])
|
||||
AC_CHECK_DECLS([sbrk])
|
||||
AC_CHECK_DECLS([setregid])
|
||||
AC_CHECK_DECLS([strcpy])
|
||||
@@ -898,7 +899,7 @@ AC_CHECK_DECLS([strtold], [
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdlib.h>]],
|
||||
[[long double r; char *foo, bar; r = strtold(foo, &bar);]]
|
||||
[[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
|
||||
)],
|
||||
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
|
||||
]
|
||||
@@ -1072,6 +1073,7 @@ BASH_STAT_TIME
|
||||
|
||||
dnl checks for system calls
|
||||
BASH_FUNC_SBRK
|
||||
BASH_FUNC_BRK
|
||||
|
||||
dnl presence and behavior of C library functions
|
||||
BASH_FUNC_STRSIGNAL
|
||||
|
||||
+796
-795
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -2290,7 +2290,7 @@ Control how the results of pathname expansion are sorted.
|
||||
The value of this variable specifies the sort criteria and sort order for
|
||||
the results of pathname expansion.
|
||||
If this variable is unset or set to the null string, pathname expansion
|
||||
uses the historial behavior of sorting by name.
|
||||
uses the historical behavior of sorting by name.
|
||||
If set, a valid value begins with an optional \fI+\fP, which is ignored,
|
||||
or \fI\-\fP, which reverses the sort order from ascending to descending,
|
||||
followed by a sort specifier.
|
||||
|
||||
+115
-103
@@ -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.3, 1 November 2023).
|
||||
Bash shell (version 5.3, 6 November 2023).
|
||||
|
||||
This is Edition 5.3, last updated 1 November 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 6 November 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
@@ -26,10 +26,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 1 November 2023). The Bash home page is
|
||||
Bash shell (version 5.3, 6 November 2023). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 1 November 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 6 November 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -4089,8 +4089,10 @@ standard.
|
||||
shared object FILENAME, on systems that support dynamic loading.
|
||||
Bash will use the value of the 'BASH_LOADABLES_PATH' variable as a
|
||||
colon-separated list of directories in which to search for
|
||||
FILENAME. The default is system-dependent. The '-d' option will
|
||||
delete a builtin loaded with '-f'.
|
||||
FILENAME, if FILENAME does not contain a slash. The default is
|
||||
system-dependent, and may include "." to force a search of the
|
||||
current directory. The '-d' option will delete a builtin loaded
|
||||
with '-f'.
|
||||
|
||||
If there are no options, a list of the shell builtins is displayed.
|
||||
The '-s' option restricts 'enable' to the POSIX special builtins.
|
||||
@@ -5165,8 +5167,9 @@ This builtin allows you to change additional shell optional behavior.
|
||||
string is not translated, this has no effect.
|
||||
|
||||
'nullglob'
|
||||
If set, Bash allows filename patterns which match no files to
|
||||
expand to a null string, rather than themselves.
|
||||
If set, filename expansion patterns which match no files
|
||||
(*note Filename Expansion::) expand to nothing and are
|
||||
removed, rather than expanding to themselves.
|
||||
|
||||
'patsub_replacement'
|
||||
If set, Bash expands occurrences of '&' in the replacement
|
||||
@@ -5246,8 +5249,8 @@ differently than the rest of the Bash builtin commands. The Bash POSIX
|
||||
mode is described in *note Bash POSIX Mode::.
|
||||
|
||||
These are the POSIX special builtins:
|
||||
break : . continue eval exec exit export readonly return set
|
||||
shift trap unset
|
||||
break : . source continue eval exec exit export readonly return set
|
||||
shift times trap unset
|
||||
|
||||
|
||||
File: bash.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top
|
||||
@@ -5698,7 +5701,7 @@ Variables::).
|
||||
Control how the results of filename expansion are sorted. The
|
||||
value of this variable specifies the sort criteria and sort order
|
||||
for the results of filename expansion. If this variable is unset
|
||||
or set to the null string, filename expansion uses the historial
|
||||
or set to the null string, filename expansion uses the historical
|
||||
behavior of sorting by name. If set, a valid value begins with an
|
||||
optional '+', which is ignored, or '-', which reverses the sort
|
||||
order from ascending to descending, followed by a sort specifier.
|
||||
@@ -9678,6 +9681,13 @@ File: bash.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bin
|
||||
result as shell commands. Bash attempts to invoke '$VISUAL',
|
||||
'$EDITOR', and 'emacs' as the editor, in that order.
|
||||
|
||||
'execute-named-command (M-x)'
|
||||
Read a bindable readline command name from the input and execute
|
||||
the function to which it's bound, as if the key sequence to which
|
||||
it was bound appeared in the input. If this function is supplied
|
||||
with a numeric argument, it passes that argument to the function it
|
||||
executes.
|
||||
|
||||
|
||||
File: bash.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing
|
||||
|
||||
@@ -11119,7 +11129,7 @@ does not provide the necessary support.
|
||||
another instance of the shell from the environment. This option is
|
||||
enabled by default.
|
||||
|
||||
'--enable-glob-asciirange-default'
|
||||
'--enable-glob-asciiranges-default'
|
||||
Set the default value of the 'globasciiranges' shell option
|
||||
described above under *note The Shopt Builtin:: to be enabled.
|
||||
This controls the behavior of character ranges when used in pattern
|
||||
@@ -12159,26 +12169,26 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 153)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 197)
|
||||
* help: Bash Builtins. (line 351)
|
||||
* help: Bash Builtins. (line 353)
|
||||
* history: Bash History Builtins.
|
||||
(line 46)
|
||||
* jobs: Job Control Builtins.
|
||||
(line 27)
|
||||
* kill: Job Control Builtins.
|
||||
(line 58)
|
||||
* let: Bash Builtins. (line 370)
|
||||
* local: Bash Builtins. (line 378)
|
||||
* logout: Bash Builtins. (line 395)
|
||||
* mapfile: Bash Builtins. (line 400)
|
||||
* let: Bash Builtins. (line 372)
|
||||
* local: Bash Builtins. (line 380)
|
||||
* logout: Bash Builtins. (line 397)
|
||||
* mapfile: Bash Builtins. (line 402)
|
||||
* popd: Directory Stack Builtins.
|
||||
(line 35)
|
||||
* printf: Bash Builtins. (line 446)
|
||||
* printf: Bash Builtins. (line 448)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 69)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 222)
|
||||
* read: Bash Builtins. (line 514)
|
||||
* readarray: Bash Builtins. (line 617)
|
||||
* read: Bash Builtins. (line 516)
|
||||
* readarray: Bash Builtins. (line 619)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 232)
|
||||
* return: Bourne Shell Builtins.
|
||||
@@ -12187,7 +12197,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 272)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 626)
|
||||
* source: Bash Builtins. (line 628)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 116)
|
||||
* test: Bourne Shell Builtins.
|
||||
@@ -12198,12 +12208,12 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 393)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 455)
|
||||
* type: Bash Builtins. (line 631)
|
||||
* typeset: Bash Builtins. (line 669)
|
||||
* ulimit: Bash Builtins. (line 675)
|
||||
* type: Bash Builtins. (line 633)
|
||||
* typeset: Bash Builtins. (line 671)
|
||||
* ulimit: Bash Builtins. (line 677)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 460)
|
||||
* unalias: Bash Builtins. (line 781)
|
||||
* unalias: Bash Builtins. (line 783)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 478)
|
||||
* wait: Job Control Builtins.
|
||||
@@ -12581,6 +12591,8 @@ D.4 Function Index
|
||||
* end-of-line (C-e): Commands For Moving. (line 9)
|
||||
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
|
||||
(line 37)
|
||||
* execute-named-command (M-x): Miscellaneous Commands.
|
||||
(line 146)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 103)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 21)
|
||||
@@ -12933,84 +12945,84 @@ Node: Shell Scripts137019
|
||||
Node: Shell Builtin Commands140043
|
||||
Node: Bourne Shell Builtins142078
|
||||
Node: Bash Builtins165467
|
||||
Node: Modifying Shell Behavior198403
|
||||
Node: The Set Builtin198745
|
||||
Node: The Shopt Builtin209716
|
||||
Node: Special Builtins225851
|
||||
Node: Shell Variables226827
|
||||
Node: Bourne Shell Variables227261
|
||||
Node: Bash Variables229362
|
||||
Node: Bash Features264427
|
||||
Node: Invoking Bash265437
|
||||
Node: Bash Startup Files271568
|
||||
Node: Interactive Shells276696
|
||||
Node: What is an Interactive Shell?277104
|
||||
Node: Is this Shell Interactive?277750
|
||||
Node: Interactive Shell Behavior278562
|
||||
Node: Bash Conditional Expressions282188
|
||||
Node: Shell Arithmetic287098
|
||||
Node: Aliases290056
|
||||
Node: Arrays292947
|
||||
Node: The Directory Stack299578
|
||||
Node: Directory Stack Builtins300359
|
||||
Node: Controlling the Prompt304616
|
||||
Node: The Restricted Shell307578
|
||||
Node: Bash POSIX Mode310185
|
||||
Node: Shell Compatibility Mode326439
|
||||
Node: Job Control334684
|
||||
Node: Job Control Basics335141
|
||||
Node: Job Control Builtins340140
|
||||
Node: Job Control Variables345932
|
||||
Node: Command Line Editing347085
|
||||
Node: Introduction and Notation348753
|
||||
Node: Readline Interaction350373
|
||||
Node: Readline Bare Essentials351561
|
||||
Node: Readline Movement Commands353347
|
||||
Node: Readline Killing Commands354304
|
||||
Node: Readline Arguments356222
|
||||
Node: Searching357263
|
||||
Node: Readline Init File359446
|
||||
Node: Readline Init File Syntax360704
|
||||
Node: Conditional Init Constructs384726
|
||||
Node: Sample Init File388919
|
||||
Node: Bindable Readline Commands392040
|
||||
Node: Commands For Moving393241
|
||||
Node: Commands For History395289
|
||||
Node: Commands For Text400280
|
||||
Node: Commands For Killing404255
|
||||
Node: Numeric Arguments406956
|
||||
Node: Commands For Completion408092
|
||||
Node: Keyboard Macros412280
|
||||
Node: Miscellaneous Commands412965
|
||||
Node: Readline vi Mode419000
|
||||
Node: Programmable Completion419904
|
||||
Node: Programmable Completion Builtins427681
|
||||
Node: A Programmable Completion Example438798
|
||||
Node: Using History Interactively444043
|
||||
Node: Bash History Facilities444724
|
||||
Node: Bash History Builtins447732
|
||||
Node: History Interaction452820
|
||||
Node: Event Designators456630
|
||||
Node: Word Designators458165
|
||||
Node: Modifiers460027
|
||||
Node: Installing Bash461832
|
||||
Node: Basic Installation462966
|
||||
Node: Compilers and Options466685
|
||||
Node: Compiling For Multiple Architectures467423
|
||||
Node: Installation Names469112
|
||||
Node: Specifying the System Type471218
|
||||
Node: Sharing Defaults471932
|
||||
Node: Operation Controls472602
|
||||
Node: Optional Features473557
|
||||
Node: Reporting Bugs484773
|
||||
Node: Major Differences From The Bourne Shell486104
|
||||
Node: GNU Free Documentation License502959
|
||||
Node: Indexes528133
|
||||
Node: Builtin Index528584
|
||||
Node: Reserved Word Index535682
|
||||
Node: Variable Index538127
|
||||
Node: Function Index555258
|
||||
Node: Concept Index568976
|
||||
Node: Modifying Shell Behavior198516
|
||||
Node: The Set Builtin198858
|
||||
Node: The Shopt Builtin209829
|
||||
Node: Special Builtins226021
|
||||
Node: Shell Variables227010
|
||||
Node: Bourne Shell Variables227444
|
||||
Node: Bash Variables229545
|
||||
Node: Bash Features264611
|
||||
Node: Invoking Bash265621
|
||||
Node: Bash Startup Files271752
|
||||
Node: Interactive Shells276880
|
||||
Node: What is an Interactive Shell?277288
|
||||
Node: Is this Shell Interactive?277934
|
||||
Node: Interactive Shell Behavior278746
|
||||
Node: Bash Conditional Expressions282372
|
||||
Node: Shell Arithmetic287282
|
||||
Node: Aliases290240
|
||||
Node: Arrays293131
|
||||
Node: The Directory Stack299762
|
||||
Node: Directory Stack Builtins300543
|
||||
Node: Controlling the Prompt304800
|
||||
Node: The Restricted Shell307762
|
||||
Node: Bash POSIX Mode310369
|
||||
Node: Shell Compatibility Mode326623
|
||||
Node: Job Control334868
|
||||
Node: Job Control Basics335325
|
||||
Node: Job Control Builtins340324
|
||||
Node: Job Control Variables346116
|
||||
Node: Command Line Editing347269
|
||||
Node: Introduction and Notation348937
|
||||
Node: Readline Interaction350557
|
||||
Node: Readline Bare Essentials351745
|
||||
Node: Readline Movement Commands353531
|
||||
Node: Readline Killing Commands354488
|
||||
Node: Readline Arguments356406
|
||||
Node: Searching357447
|
||||
Node: Readline Init File359630
|
||||
Node: Readline Init File Syntax360888
|
||||
Node: Conditional Init Constructs384910
|
||||
Node: Sample Init File389103
|
||||
Node: Bindable Readline Commands392224
|
||||
Node: Commands For Moving393425
|
||||
Node: Commands For History395473
|
||||
Node: Commands For Text400464
|
||||
Node: Commands For Killing404439
|
||||
Node: Numeric Arguments407140
|
||||
Node: Commands For Completion408276
|
||||
Node: Keyboard Macros412464
|
||||
Node: Miscellaneous Commands413149
|
||||
Node: Readline vi Mode419515
|
||||
Node: Programmable Completion420419
|
||||
Node: Programmable Completion Builtins428196
|
||||
Node: A Programmable Completion Example439313
|
||||
Node: Using History Interactively444558
|
||||
Node: Bash History Facilities445239
|
||||
Node: Bash History Builtins448247
|
||||
Node: History Interaction453335
|
||||
Node: Event Designators457145
|
||||
Node: Word Designators458680
|
||||
Node: Modifiers460542
|
||||
Node: Installing Bash462347
|
||||
Node: Basic Installation463481
|
||||
Node: Compilers and Options467200
|
||||
Node: Compiling For Multiple Architectures467938
|
||||
Node: Installation Names469627
|
||||
Node: Specifying the System Type471733
|
||||
Node: Sharing Defaults472447
|
||||
Node: Operation Controls473117
|
||||
Node: Optional Features474072
|
||||
Node: Reporting Bugs485289
|
||||
Node: Major Differences From The Bourne Shell486620
|
||||
Node: GNU Free Documentation License503475
|
||||
Node: Indexes528649
|
||||
Node: Builtin Index529100
|
||||
Node: Reserved Word Index536198
|
||||
Node: Variable Index538643
|
||||
Node: Function Index555774
|
||||
Node: Concept Index569630
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -306,7 +306,7 @@
|
||||
@xrdef{Programmable Completion-title}{Programmable Completion}
|
||||
@xrdef{Programmable Completion-snt}{Section@tie 8.6}
|
||||
@xrdef{Readline vi Mode-pg}{149}
|
||||
@xrdef{Programmable Completion-pg}{149}
|
||||
@xrdef{Programmable Completion-pg}{150}
|
||||
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
|
||||
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
|
||||
@xrdef{Programmable Completion Builtins-pg}{152}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
\entry{mapfile}{63}{\code {mapfile}}
|
||||
\entry{printf}{64}{\code {printf}}
|
||||
\entry{read}{65}{\code {read}}
|
||||
\entry{readarray}{66}{\code {readarray}}
|
||||
\entry{readarray}{67}{\code {readarray}}
|
||||
\entry{source}{67}{\code {source}}
|
||||
\entry{type}{67}{\code {type}}
|
||||
\entry{typeset}{67}{\code {typeset}}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
\entry{\code {pwd}}{52}
|
||||
\initial {R}
|
||||
\entry{\code {read}}{65}
|
||||
\entry{\code {readarray}}{66}
|
||||
\entry{\code {readarray}}{67}
|
||||
\entry{\code {readonly}}{53}
|
||||
\entry{\code {return}}{53}
|
||||
\initial {S}
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@
|
||||
\entry{kill ring}{124}{kill ring}
|
||||
\entry{initialization file, readline}{125}{initialization file, readline}
|
||||
\entry{variables, readline}{126}{variables, readline}
|
||||
\entry{programmable completion}{149}{programmable completion}
|
||||
\entry{programmable completion}{150}{programmable completion}
|
||||
\entry{completion builtins}{152}{completion builtins}
|
||||
\entry{History, how to use}{158}{History, how to use}
|
||||
\entry{command history}{159}{command history}
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@
|
||||
\entry{process group}{3}
|
||||
\entry{process group ID}{3}
|
||||
\entry{process substitution}{35}
|
||||
\entry{programmable completion}{149}
|
||||
\entry{programmable completion}{150}
|
||||
\entry{prompting}{107}
|
||||
\initial {Q}
|
||||
\entry{quoting}{6}
|
||||
|
||||
@@ -112,3 +112,4 @@
|
||||
\entry{history-and-alias-expand-line ()}{149}{\code {history-and-alias-expand-line ()}}
|
||||
\entry{insert-last-argument (M-. or M-_)}{149}{\code {insert-last-argument (M-. or M-_)}}
|
||||
\entry{edit-and-execute-command (C-x C-e)}{149}{\code {edit-and-execute-command (C-x C-e)}}
|
||||
\entry{execute-named-command (M-x)}{149}{\code {execute-named-command (M-x)}}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
\entry{\code {end-of-history (M->)}}{140}
|
||||
\entry{\code {end-of-line (C-e)}}{139}
|
||||
\entry{\code {exchange-point-and-mark (C-x C-x)}}{147}
|
||||
\entry{\code {execute-named-command (M-x)}}{149}
|
||||
\initial {F}
|
||||
\entry{\code {fetch-history ()}}{142}
|
||||
\entry{\code {forward-backward-delete-char ()}}{142}
|
||||
|
||||
+115
-103
@@ -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.3, 1 November 2023).
|
||||
Bash shell (version 5.3, 6 November 2023).
|
||||
|
||||
This is Edition 5.3, last updated 1 November 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 6 November 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
@@ -27,10 +27,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 1 November 2023). The Bash home page is
|
||||
Bash shell (version 5.3, 6 November 2023). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 1 November 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 6 November 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -4090,8 +4090,10 @@ standard.
|
||||
shared object FILENAME, on systems that support dynamic loading.
|
||||
Bash will use the value of the 'BASH_LOADABLES_PATH' variable as a
|
||||
colon-separated list of directories in which to search for
|
||||
FILENAME. The default is system-dependent. The '-d' option will
|
||||
delete a builtin loaded with '-f'.
|
||||
FILENAME, if FILENAME does not contain a slash. The default is
|
||||
system-dependent, and may include "." to force a search of the
|
||||
current directory. The '-d' option will delete a builtin loaded
|
||||
with '-f'.
|
||||
|
||||
If there are no options, a list of the shell builtins is displayed.
|
||||
The '-s' option restricts 'enable' to the POSIX special builtins.
|
||||
@@ -5166,8 +5168,9 @@ This builtin allows you to change additional shell optional behavior.
|
||||
string is not translated, this has no effect.
|
||||
|
||||
'nullglob'
|
||||
If set, Bash allows filename patterns which match no files to
|
||||
expand to a null string, rather than themselves.
|
||||
If set, filename expansion patterns which match no files
|
||||
(*note Filename Expansion::) expand to nothing and are
|
||||
removed, rather than expanding to themselves.
|
||||
|
||||
'patsub_replacement'
|
||||
If set, Bash expands occurrences of '&' in the replacement
|
||||
@@ -5247,8 +5250,8 @@ differently than the rest of the Bash builtin commands. The Bash POSIX
|
||||
mode is described in *note Bash POSIX Mode::.
|
||||
|
||||
These are the POSIX special builtins:
|
||||
break : . continue eval exec exit export readonly return set
|
||||
shift trap unset
|
||||
break : . source continue eval exec exit export readonly return set
|
||||
shift times trap unset
|
||||
|
||||
|
||||
File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top
|
||||
@@ -5699,7 +5702,7 @@ Variables::).
|
||||
Control how the results of filename expansion are sorted. The
|
||||
value of this variable specifies the sort criteria and sort order
|
||||
for the results of filename expansion. If this variable is unset
|
||||
or set to the null string, filename expansion uses the historial
|
||||
or set to the null string, filename expansion uses the historical
|
||||
behavior of sorting by name. If set, a valid value begins with an
|
||||
optional '+', which is ignored, or '-', which reverses the sort
|
||||
order from ascending to descending, followed by a sort specifier.
|
||||
@@ -9679,6 +9682,13 @@ File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up:
|
||||
result as shell commands. Bash attempts to invoke '$VISUAL',
|
||||
'$EDITOR', and 'emacs' as the editor, in that order.
|
||||
|
||||
'execute-named-command (M-x)'
|
||||
Read a bindable readline command name from the input and execute
|
||||
the function to which it's bound, as if the key sequence to which
|
||||
it was bound appeared in the input. If this function is supplied
|
||||
with a numeric argument, it passes that argument to the function it
|
||||
executes.
|
||||
|
||||
|
||||
File: bashref.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing
|
||||
|
||||
@@ -11120,7 +11130,7 @@ does not provide the necessary support.
|
||||
another instance of the shell from the environment. This option is
|
||||
enabled by default.
|
||||
|
||||
'--enable-glob-asciirange-default'
|
||||
'--enable-glob-asciiranges-default'
|
||||
Set the default value of the 'globasciiranges' shell option
|
||||
described above under *note The Shopt Builtin:: to be enabled.
|
||||
This controls the behavior of character ranges when used in pattern
|
||||
@@ -12160,26 +12170,26 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 153)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 197)
|
||||
* help: Bash Builtins. (line 351)
|
||||
* help: Bash Builtins. (line 353)
|
||||
* history: Bash History Builtins.
|
||||
(line 46)
|
||||
* jobs: Job Control Builtins.
|
||||
(line 27)
|
||||
* kill: Job Control Builtins.
|
||||
(line 58)
|
||||
* let: Bash Builtins. (line 370)
|
||||
* local: Bash Builtins. (line 378)
|
||||
* logout: Bash Builtins. (line 395)
|
||||
* mapfile: Bash Builtins. (line 400)
|
||||
* let: Bash Builtins. (line 372)
|
||||
* local: Bash Builtins. (line 380)
|
||||
* logout: Bash Builtins. (line 397)
|
||||
* mapfile: Bash Builtins. (line 402)
|
||||
* popd: Directory Stack Builtins.
|
||||
(line 35)
|
||||
* printf: Bash Builtins. (line 446)
|
||||
* printf: Bash Builtins. (line 448)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 69)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 222)
|
||||
* read: Bash Builtins. (line 514)
|
||||
* readarray: Bash Builtins. (line 617)
|
||||
* read: Bash Builtins. (line 516)
|
||||
* readarray: Bash Builtins. (line 619)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 232)
|
||||
* return: Bourne Shell Builtins.
|
||||
@@ -12188,7 +12198,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 272)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 626)
|
||||
* source: Bash Builtins. (line 628)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 116)
|
||||
* test: Bourne Shell Builtins.
|
||||
@@ -12199,12 +12209,12 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 393)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 455)
|
||||
* type: Bash Builtins. (line 631)
|
||||
* typeset: Bash Builtins. (line 669)
|
||||
* ulimit: Bash Builtins. (line 675)
|
||||
* type: Bash Builtins. (line 633)
|
||||
* typeset: Bash Builtins. (line 671)
|
||||
* ulimit: Bash Builtins. (line 677)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 460)
|
||||
* unalias: Bash Builtins. (line 781)
|
||||
* unalias: Bash Builtins. (line 783)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 478)
|
||||
* wait: Job Control Builtins.
|
||||
@@ -12582,6 +12592,8 @@ D.4 Function Index
|
||||
* end-of-line (C-e): Commands For Moving. (line 9)
|
||||
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
|
||||
(line 37)
|
||||
* execute-named-command (M-x): Miscellaneous Commands.
|
||||
(line 146)
|
||||
* fetch-history (): Commands For History.
|
||||
(line 103)
|
||||
* forward-backward-delete-char (): Commands For Text. (line 21)
|
||||
@@ -12934,84 +12946,84 @@ Node: Shell Scripts137172
|
||||
Node: Shell Builtin Commands140199
|
||||
Node: Bourne Shell Builtins142237
|
||||
Node: Bash Builtins165629
|
||||
Node: Modifying Shell Behavior198568
|
||||
Node: The Set Builtin198913
|
||||
Node: The Shopt Builtin209887
|
||||
Node: Special Builtins226025
|
||||
Node: Shell Variables227004
|
||||
Node: Bourne Shell Variables227441
|
||||
Node: Bash Variables229545
|
||||
Node: Bash Features264613
|
||||
Node: Invoking Bash265626
|
||||
Node: Bash Startup Files271760
|
||||
Node: Interactive Shells276891
|
||||
Node: What is an Interactive Shell?277302
|
||||
Node: Is this Shell Interactive?277951
|
||||
Node: Interactive Shell Behavior278766
|
||||
Node: Bash Conditional Expressions282395
|
||||
Node: Shell Arithmetic287308
|
||||
Node: Aliases290269
|
||||
Node: Arrays293163
|
||||
Node: The Directory Stack299797
|
||||
Node: Directory Stack Builtins300581
|
||||
Node: Controlling the Prompt304841
|
||||
Node: The Restricted Shell307806
|
||||
Node: Bash POSIX Mode310416
|
||||
Node: Shell Compatibility Mode326673
|
||||
Node: Job Control334921
|
||||
Node: Job Control Basics335381
|
||||
Node: Job Control Builtins340383
|
||||
Node: Job Control Variables346178
|
||||
Node: Command Line Editing347334
|
||||
Node: Introduction and Notation349005
|
||||
Node: Readline Interaction350628
|
||||
Node: Readline Bare Essentials351819
|
||||
Node: Readline Movement Commands353608
|
||||
Node: Readline Killing Commands354568
|
||||
Node: Readline Arguments356489
|
||||
Node: Searching357533
|
||||
Node: Readline Init File359719
|
||||
Node: Readline Init File Syntax360980
|
||||
Node: Conditional Init Constructs385005
|
||||
Node: Sample Init File389201
|
||||
Node: Bindable Readline Commands392325
|
||||
Node: Commands For Moving393529
|
||||
Node: Commands For History395580
|
||||
Node: Commands For Text400574
|
||||
Node: Commands For Killing404552
|
||||
Node: Numeric Arguments407256
|
||||
Node: Commands For Completion408395
|
||||
Node: Keyboard Macros412586
|
||||
Node: Miscellaneous Commands413274
|
||||
Node: Readline vi Mode419312
|
||||
Node: Programmable Completion420219
|
||||
Node: Programmable Completion Builtins427999
|
||||
Node: A Programmable Completion Example439119
|
||||
Node: Using History Interactively444367
|
||||
Node: Bash History Facilities445051
|
||||
Node: Bash History Builtins448062
|
||||
Node: History Interaction453153
|
||||
Node: Event Designators456966
|
||||
Node: Word Designators458504
|
||||
Node: Modifiers460369
|
||||
Node: Installing Bash462177
|
||||
Node: Basic Installation463314
|
||||
Node: Compilers and Options467036
|
||||
Node: Compiling For Multiple Architectures467777
|
||||
Node: Installation Names469469
|
||||
Node: Specifying the System Type471578
|
||||
Node: Sharing Defaults472295
|
||||
Node: Operation Controls472968
|
||||
Node: Optional Features473926
|
||||
Node: Reporting Bugs485145
|
||||
Node: Major Differences From The Bourne Shell486479
|
||||
Node: GNU Free Documentation License503337
|
||||
Node: Indexes528514
|
||||
Node: Builtin Index528968
|
||||
Node: Reserved Word Index536069
|
||||
Node: Variable Index538517
|
||||
Node: Function Index555651
|
||||
Node: Concept Index569372
|
||||
Node: Modifying Shell Behavior198681
|
||||
Node: The Set Builtin199026
|
||||
Node: The Shopt Builtin210000
|
||||
Node: Special Builtins226195
|
||||
Node: Shell Variables227187
|
||||
Node: Bourne Shell Variables227624
|
||||
Node: Bash Variables229728
|
||||
Node: Bash Features264797
|
||||
Node: Invoking Bash265810
|
||||
Node: Bash Startup Files271944
|
||||
Node: Interactive Shells277075
|
||||
Node: What is an Interactive Shell?277486
|
||||
Node: Is this Shell Interactive?278135
|
||||
Node: Interactive Shell Behavior278950
|
||||
Node: Bash Conditional Expressions282579
|
||||
Node: Shell Arithmetic287492
|
||||
Node: Aliases290453
|
||||
Node: Arrays293347
|
||||
Node: The Directory Stack299981
|
||||
Node: Directory Stack Builtins300765
|
||||
Node: Controlling the Prompt305025
|
||||
Node: The Restricted Shell307990
|
||||
Node: Bash POSIX Mode310600
|
||||
Node: Shell Compatibility Mode326857
|
||||
Node: Job Control335105
|
||||
Node: Job Control Basics335565
|
||||
Node: Job Control Builtins340567
|
||||
Node: Job Control Variables346362
|
||||
Node: Command Line Editing347518
|
||||
Node: Introduction and Notation349189
|
||||
Node: Readline Interaction350812
|
||||
Node: Readline Bare Essentials352003
|
||||
Node: Readline Movement Commands353792
|
||||
Node: Readline Killing Commands354752
|
||||
Node: Readline Arguments356673
|
||||
Node: Searching357717
|
||||
Node: Readline Init File359903
|
||||
Node: Readline Init File Syntax361164
|
||||
Node: Conditional Init Constructs385189
|
||||
Node: Sample Init File389385
|
||||
Node: Bindable Readline Commands392509
|
||||
Node: Commands For Moving393713
|
||||
Node: Commands For History395764
|
||||
Node: Commands For Text400758
|
||||
Node: Commands For Killing404736
|
||||
Node: Numeric Arguments407440
|
||||
Node: Commands For Completion408579
|
||||
Node: Keyboard Macros412770
|
||||
Node: Miscellaneous Commands413458
|
||||
Node: Readline vi Mode419827
|
||||
Node: Programmable Completion420734
|
||||
Node: Programmable Completion Builtins428514
|
||||
Node: A Programmable Completion Example439634
|
||||
Node: Using History Interactively444882
|
||||
Node: Bash History Facilities445566
|
||||
Node: Bash History Builtins448577
|
||||
Node: History Interaction453668
|
||||
Node: Event Designators457481
|
||||
Node: Word Designators459019
|
||||
Node: Modifiers460884
|
||||
Node: Installing Bash462692
|
||||
Node: Basic Installation463829
|
||||
Node: Compilers and Options467551
|
||||
Node: Compiling For Multiple Architectures468292
|
||||
Node: Installation Names469984
|
||||
Node: Specifying the System Type472093
|
||||
Node: Sharing Defaults472810
|
||||
Node: Operation Controls473483
|
||||
Node: Optional Features474441
|
||||
Node: Reporting Bugs485661
|
||||
Node: Major Differences From The Bourne Shell486995
|
||||
Node: GNU Free Documentation License503853
|
||||
Node: Indexes529030
|
||||
Node: Builtin Index529484
|
||||
Node: Reserved Word Index536585
|
||||
Node: Variable Index539033
|
||||
Node: Function Index556167
|
||||
Node: Concept Index570026
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+21
-21
@@ -1,12 +1,12 @@
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 11 OCT 2023 10:24
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 24 NOV 2023 12:20
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
file:line:error style messages enabled.
|
||||
%&-line parsing enabled.
|
||||
**\input /usr/local/src/bash/bash-20231007/doc/bashref.texi \input /usr/local/s
|
||||
rc/bash/bash-20231007/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20231007/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20231007/doc/texinfo.tex
|
||||
**\input /usr/local/src/bash/bash-20231114/doc/bashref.texi \input /usr/local/s
|
||||
rc/bash/bash-20231114/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20231114/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20231114/doc/texinfo.tex
|
||||
Loading texinfo [version 2015-11-22.14]:
|
||||
\outerhsize=\dimen16
|
||||
\outervsize=\dimen17
|
||||
@@ -162,15 +162,15 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
|
||||
texinfo.tex: doing @include of version.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20231007/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
(/usr/local/src/bash/bash-20231114/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
/fonts/map/pdftex/updmap/pdftex.map}] [2]
|
||||
(/usr/local/build/bash/bash-20231007/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20231007/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20231007/doc/bashref.toc) Chapter 1
|
||||
(/usr/local/build/bash/bash-20231114/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20231114/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20231114/doc/bashref.toc) Chapter 1
|
||||
\openout0 = `bashref.toc'.
|
||||
|
||||
|
||||
(/usr/local/build/bash/bash-20231007/doc/bashref.aux)
|
||||
(/usr/local/build/bash/bash-20231114/doc/bashref.aux)
|
||||
\openout1 = `bashref.aux'.
|
||||
|
||||
Chapter 2 [1] [2]
|
||||
@@ -230,7 +230,7 @@ Overfull \hbox (5.95723pt too wide) in paragraph at lines 724--725
|
||||
[49] [50] [51]
|
||||
[52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
|
||||
[67] [68]
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5412--5412
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5414--5414
|
||||
[]@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -243,7 +243,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5412--5412
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5413--5413
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5415--5415
|
||||
[]@texttt set [+abefhkmnptuvxBCEHPT] [+o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -262,7 +262,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5413--5413
|
||||
[119] [120]
|
||||
texinfo.tex: doing @include of rluser.texi
|
||||
|
||||
(/usr/local/src/bash/bash-20231007/lib/readline/doc/rluser.texi
|
||||
(/usr/local/src/bash/bash-20231114/lib/readline/doc/rluser.texi
|
||||
Chapter 8 [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131]
|
||||
[132]
|
||||
Underfull \hbox (badness 7540) in paragraph at lines 878--884
|
||||
@@ -312,10 +312,10 @@ gnored[]
|
||||
texinfo.tex: doing @include of hsuser.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20231007/lib/readline/doc/hsuser.texi Chapter 9
|
||||
(/usr/local/src/bash/bash-20231114/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[158] [159] [160] [161] [162] [163]) Chapter 10 [164] [165] [166] [167]
|
||||
[168]
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 9749--9758
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 9759--9768
|
||||
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
|
||||
entation[]@textrm '[],
|
||||
|
||||
@@ -328,7 +328,7 @@ entation[]@textrm '[],
|
||||
.etc.
|
||||
|
||||
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 9749--9758
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 9759--9768
|
||||
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
|
||||
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
|
||||
@@ -344,13 +344,13 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
[178] [179] Appendix C [180]
|
||||
texinfo.tex: doing @include of fdl.texi
|
||||
|
||||
(/usr/local/src/bash/bash-20231007/doc/fdl.texi
|
||||
(/usr/local/src/bash/bash-20231114/doc/fdl.texi
|
||||
[181] [182] [183] [184] [185] [186] [187]) Appendix D [188] [189] [190]
|
||||
[191] [192] [193] [194] [195] [196] [197] )
|
||||
Here is how much of TeX's memory you used:
|
||||
4104 strings out of 497086
|
||||
47614 string characters out of 6206517
|
||||
142179 words of memory out of 5000000
|
||||
141907 words of memory out of 5000000
|
||||
4869 multiletter control sequences out of 15000+600000
|
||||
34315 words of font info for 116 fonts, out of 8000000 for 9000
|
||||
51 hyphenation exceptions out of 8191
|
||||
@@ -372,10 +372,10 @@ texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texli
|
||||
ve/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fon
|
||||
ts/type1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/typ
|
||||
e1/public/cm-super/sfrm1440.pfb>
|
||||
Output written on bashref.pdf (203 pages, 813993 bytes).
|
||||
Output written on bashref.pdf (203 pages, 815170 bytes).
|
||||
PDF statistics:
|
||||
2824 PDF objects out of 2984 (max. 8388607)
|
||||
2574 compressed objects within 26 object streams
|
||||
2829 PDF objects out of 2984 (max. 8388607)
|
||||
2579 compressed objects within 26 object streams
|
||||
331 named destinations out of 1000 (max. 500000)
|
||||
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
||||
|
||||
Binary file not shown.
+2
-2
@@ -6649,7 +6649,7 @@ Control how the results of filename expansion are sorted.
|
||||
The value of this variable specifies the sort criteria and sort order for
|
||||
the results of filename expansion.
|
||||
If this variable is unset or set to the null string, filename expansion
|
||||
uses the historial behavior of sorting by name.
|
||||
uses the historical behavior of sorting by name.
|
||||
If set, a valid value begins with an optional @samp{+}, which is ignored,
|
||||
or @samp{-}, which reverses the sort order from ascending to descending,
|
||||
followed by a sort specifier.
|
||||
@@ -9863,7 +9863,7 @@ Include support for importing function definitions exported by another
|
||||
instance of the shell from the environment. This option is enabled by
|
||||
default.
|
||||
|
||||
@item --enable-glob-asciirange-default
|
||||
@item --enable-glob-asciiranges-default
|
||||
Set the default value of the @code{globasciiranges} shell option described
|
||||
above under @ref{The Shopt Builtin} to be enabled.
|
||||
This controls the behavior of character ranges when used in pattern matching
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@
|
||||
@numsubsecentry{Keyboard Macros}{8.4.7}{Keyboard Macros}{146}
|
||||
@numsubsecentry{Some Miscellaneous Commands}{8.4.8}{Miscellaneous Commands}{147}
|
||||
@numsecentry{Readline vi Mode}{8.5}{Readline vi Mode}{149}
|
||||
@numsecentry{Programmable Completion}{8.6}{Programmable Completion}{149}
|
||||
@numsecentry{Programmable Completion}{8.6}{Programmable Completion}{150}
|
||||
@numsecentry{Programmable Completion Builtins}{8.7}{Programmable Completion Builtins}{152}
|
||||
@numsecentry{A Programmable Completion Example}{8.8}{A Programmable Completion Example}{156}
|
||||
@numchapentry{Using History Interactively}{9}{Using History Interactively}{159}
|
||||
|
||||
@@ -103,7 +103,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 dsv cut stat getconf kv
|
||||
accept csv dsv cut stat getconf kv strptime
|
||||
OTHERPROG = necho hello cat pushd asort
|
||||
|
||||
SUBDIRS = perl
|
||||
@@ -235,6 +235,9 @@ cut: cut.o
|
||||
strftime: strftime.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS)
|
||||
|
||||
strptime: strptime.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strptime.o $(SHOBJ_LIBS)
|
||||
|
||||
mypid: mypid.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mypid.o $(SHOBJ_LIBS)
|
||||
|
||||
@@ -308,6 +311,14 @@ uninstall-unsupported:
|
||||
install: install-$(SHOBJ_STATUS)
|
||||
uninstall: uninstall-$(SHOBJ_STATUS)
|
||||
|
||||
OBJS = print.o truefalse.o accept.o sleep.o finfo.o getconf.o logname.o \
|
||||
basename.o dirname.o tty.o pathchk.o tee.o head.o rmdir.o necho.o \
|
||||
hello.o cat.o csv.o dsv.o kv.o cut.o printenv.o id.o whoami.o uname.o \
|
||||
sync.o push.o mkdir.o mktemp.o realpath.o strftime.o setpgid.o stat.o \
|
||||
fdflags.o seq.o asort.o strptime.o
|
||||
|
||||
${OBJS}: ${BUILD_DIR}/config.h
|
||||
|
||||
print.o: print.c
|
||||
truefalse.o: truefalse.c
|
||||
accept.o: accept.c
|
||||
@@ -344,3 +355,4 @@ stat.o: stat.c
|
||||
fdflags.o: fdflags.c
|
||||
seq.o: seq.c
|
||||
asort.o: asort.c
|
||||
strptime.o: strptime.c
|
||||
|
||||
@@ -164,6 +164,7 @@ printone(int fd, int p, int verbose)
|
||||
if ((f = getflags(fd, p)) == -1)
|
||||
return;
|
||||
|
||||
/* maybe make the file descriptor printing optional if only one argument */
|
||||
printf ("%d:", fd);
|
||||
|
||||
for (i = 0; i < N_FLAGS; i++)
|
||||
@@ -224,16 +225,14 @@ parseflags(char *s, int *p, int *n)
|
||||
}
|
||||
|
||||
static void
|
||||
setone(int fd, char *v, int verbose)
|
||||
setone(int fd, int pos, int neg, int verbose)
|
||||
{
|
||||
int f, n, pos, neg, cloexec;
|
||||
int f, n, cloexec;
|
||||
|
||||
f = getflags(fd, 1);
|
||||
if (f == -1)
|
||||
return;
|
||||
|
||||
parseflags(v, &pos, &neg);
|
||||
|
||||
cloexec = -1;
|
||||
|
||||
if ((pos & O_CLOEXEC) && (f & O_CLOEXEC) == 0)
|
||||
@@ -281,6 +280,7 @@ int
|
||||
fdflags_builtin (WORD_LIST *list)
|
||||
{
|
||||
int opt, maxfd, i, num, verbose, setflag;
|
||||
int pos, neg;
|
||||
char *setspec;
|
||||
WORD_LIST *l;
|
||||
intmax_t inum;
|
||||
@@ -311,6 +311,9 @@ fdflags_builtin (WORD_LIST *list)
|
||||
if (list == 0 && setflag)
|
||||
return (EXECUTION_SUCCESS);
|
||||
|
||||
if (setflag)
|
||||
parseflags (setspec, &pos, &neg);
|
||||
|
||||
if (list == 0)
|
||||
{
|
||||
maxfd = getmaxfd ();
|
||||
@@ -335,12 +338,12 @@ fdflags_builtin (WORD_LIST *list)
|
||||
}
|
||||
num = inum; /* truncate to int */
|
||||
if (setflag)
|
||||
setone (num, setspec, verbose);
|
||||
setone (num, pos, neg, verbose);
|
||||
else
|
||||
printone (num, 1, verbose);
|
||||
}
|
||||
|
||||
return (opt);
|
||||
return (sh_chkwrite (opt));
|
||||
}
|
||||
|
||||
char *fdflags_doc[] =
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
/* strptime - take a date-time string and turn it into seconds since the epoch. */
|
||||
|
||||
/* See Makefile for compilation details. */
|
||||
|
||||
/*
|
||||
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash.
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "bashtypes.h"
|
||||
#include "posixtime.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "builtins.h"
|
||||
#include "shell.h"
|
||||
#include "bashgetopt.h"
|
||||
#include "common.h"
|
||||
|
||||
struct date_modifier
|
||||
{
|
||||
char *shorthand;
|
||||
int incr;
|
||||
};
|
||||
|
||||
static struct date_modifier date_time_modifiers[] =
|
||||
{
|
||||
{ "now", 0 },
|
||||
{ "today", 0 },
|
||||
{ "tomorrow", 24*60*60 },
|
||||
{ "yesterday", -24*60*60 },
|
||||
{ "day after tomorrow", 48*60*60 },
|
||||
{ "two days ago", -48*60*60 },
|
||||
{ "next week", 7*24*60*60 },
|
||||
{ "last week", -7*24*60*60 },
|
||||
{ "the day after tomorrow", 48*60*60 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static char * const date_time_formats[] =
|
||||
{
|
||||
"%a %b %d %T %Z %Y", /* Unix date */
|
||||
"%a %b %d %T %Y", /* Wkd Mon DD HH:MM:SS YYYY */
|
||||
"%FT%T%z", /* ISO8601 time YYYY-mm-ddTHH:MM:SSzone */
|
||||
"%FT%R%z", /* ISO8601 time YYYY-mm-ddTHH:MMzone */
|
||||
"%G-%m-%dT%T%z", /* ISO8601 time YYYY-mm-ddTHH:MM:SSzone */
|
||||
"%G-%m-%dT%R%z", /* ISO8601 time YYYY-mm-ddTHH:MMzone */
|
||||
"%G-%m-%d", /* ISO8601 time YYYY-mm-dd */
|
||||
/* Can't do 8601 time zone offset with colon or fractions of a second */
|
||||
"%a, %d %b %Y %T %Z", /* RFC822/RFC2822 time */
|
||||
"%a, %d %b %Y %T %z", /* RFC822/RFC2822 time */
|
||||
"%D %T", /* mm/dd/yy HH:MM:SS */
|
||||
"%D %R", /* mm/dd/yy HH:MM */
|
||||
"%D %r", /* mm/dd/yy HH:MM:SS a.m. */
|
||||
"%D %I:%M %p", /* mm/dd/yy HH:MM p.m. */
|
||||
"%m/%d/%Y %T", /* mm/dd/YYYY HH:MM:SS */
|
||||
"%m/%d/%Y %R", /* mm/dd/YYYY HH:MM */
|
||||
"%m/%d/%Y %r", /* mm/dd/YYYY HH:MM:SS a.m */
|
||||
"%m/%d/%Y %I:%M %p", /* mm/dd/YYYY HH:MM p.m. */
|
||||
"%m-%d-%Y %T", /* mm-dd-YYYY HH:MM:SS */
|
||||
"%m-%d-%Y %R", /* mm-dd-YYYY HH:MM */
|
||||
"%m-%d-%Y %r", /* mm-dd-YYYY HH:MM:SS a.m. */
|
||||
"%m-%d-%Y %I:%M %p", /* mm-dd-YYYY HH:MM p.m. */
|
||||
"%Y/%m/%d %T", /* YYYY/mm/dd HH:MM:SS */
|
||||
"%Y/%m/%d %R", /* YYYY/mm/dd HH:MM */
|
||||
"%Y/%m/%d %r", /* YYYY/mm/dd hh:MM:SS a.m. */
|
||||
"%F %T", /* YYYY-mm-dd HH:MM:SS */
|
||||
"%F %r", /* YYYY-mm-dd HH:MM:SS p.m. */
|
||||
"%F %R", /* YYYY-mm-dd HH:MM */
|
||||
"%F %I:%M %p", /* YYYY-mm-dd HH:MM a.m. */
|
||||
"%F", /* YYYY-mm-dd ISO8601 time */
|
||||
"%T", /* HH:MM:SS */
|
||||
"%H.%M.%S", /* HH.MM.SS */
|
||||
/* From coreutils-9.2 date */
|
||||
"%Y-%m-%dT%H:%M:%S%z", /* ISO8601 time */
|
||||
"%Y-%m-%dT%H%z", /* ISO8601 time */
|
||||
"%Y-%m-%dT%H:%M%z", /* ISO8601 time */
|
||||
/* RFC 3339 time */
|
||||
"%Y-%m-%d %H:%M:%S%z", /* RFC 3339 time */
|
||||
"%Y-%m-%dT%H:%M:%S%z", /* RFC 3339 time */
|
||||
/* more oddball formats */
|
||||
"%m.%d.%Y %T", /* mm.dd.YYYY HH:MM:SS */
|
||||
"%m.%d.%Y %R", /* mm.dd.YYYY HH:MM */
|
||||
"%m.%d.%Y %r", /* mm.dd.YYYY HH:MM:SS a.m. */
|
||||
"%m.%d.%Y %I:%M %p", /* mm.dd.YYYY HH:MM p.m. */
|
||||
"%m/%d/%Y", /* mm/dd/YYYY */
|
||||
"%d %B %Y %T", /* dd Month YYYY HH:MM:SS */
|
||||
"%d %B %Y %R", /* dd Month YYYY HH:MM */
|
||||
"%d %B %Y %r", /* dd Month YYYY HH:MM:SS a.m. */
|
||||
"%d %B %Y %I:%M %p", /* dd Month YYYY HH:MM p.m. */
|
||||
"%d %b %Y %T", /* dd Mon YYYY HH:MM:SS */
|
||||
"%d %b %Y %R", /* dd Mon YYYY HH:MM */
|
||||
"%d %b %Y %r", /* dd Mon YYYY HH:MM:SS a.m. */
|
||||
"%d %b %Y %I:%M %p", /* dd Mon YYYY HH:MM p.m. */
|
||||
"%b %d, %Y %T", /* Mon dd, YYYY HH:MM:SS */
|
||||
"%b %d, %Y %R", /* Mon dd, YYYY HH:MM */
|
||||
"%b %d, %Y %r", /* Mon dd, YYYY HH:MM:SS a.m. */
|
||||
"%b %d, %Y %I:%M %p", /* Mon dd, YYYY HH:MM p.m. */
|
||||
"%m-%b-%Y", /* dd-Mon-YYYY */
|
||||
"%m-%b-%Y %T", /* dd-Mon-YYYY HH:MM:SS */
|
||||
"%m-%b-%Y %R", /* dd-Mon-YYYY HH:MM */
|
||||
"%m-%b-%Y %r", /* dd-Mon-YYYY HH:MM:SS a.m. */
|
||||
"%m-%b-%Y %I:%M %p", /* dd-Mon-YYYY HH:MM p.m. */
|
||||
"%d/%b/%Y:%T %z", /* NCSA log format dd/Mon/YYYY:HH:MM:SS zone */
|
||||
"%d/%b/%Y:%T%z", /* NCSA log format dd/Mon/YYYY:HH:MM:SSzone */
|
||||
/* No delimiters */
|
||||
"%Y%m%d %T", /* YYYYMMDD HH:MM:SS */
|
||||
"%Y%m%d %R", /* YYYYMMDD HH:MM */
|
||||
"%Y%m%d %r", /* YYYYMMDD HH:MM:SS a.m. */
|
||||
"%Y%m%d %I:%M %p", /* YYYYMMDD HH:MM p.m. */
|
||||
"%Y%m%d %H:%M:%S%z", /* YYYYMMDD HH:MM:SSzone */
|
||||
"%Y%m%dT%H:%M:%S%z", /* YYYYMMDDTHH:MM:SSzone */
|
||||
"%Y%m%dT%T", /* YYYYMMDDTHH:MM:SS */
|
||||
"%Y%m%dT%R", /* YYYYMMDDTHH:MM */
|
||||
/* Non-US formats */
|
||||
"%d-%m-%Y", /* dd-mm-YYYY */
|
||||
"%d-%m-%Y %T", /* dd-mm-YYYY HH:MM:SS */
|
||||
"%d-%m-%Y %R", /* dd-mm-YYYY HH:MM */
|
||||
"%d-%m-%Y %r", /* dd-mm-YYYY HH:MM:SS a.m. */
|
||||
"%d-%m-%Y %I:%M %p", /* dd-mm-YYYY HH:MM p.m. */
|
||||
"%d/%m/%Y %T", /* dd/mm/YYYY HH:MM:SS */
|
||||
"%d/%m/%Y %R", /* dd/mm/YYYY HH:MM */
|
||||
"%d/%m/%Y %r", /* dd/mm/YYYY HH:MM:SS a.m. */
|
||||
"%d/%m/%Y %I:%M %p", /* dd/mm/YYYY HH:MM p.m. */
|
||||
"%Y-%d-%m %T", /* YYYY-dd-mm HH:MM:SS */
|
||||
"%Y-%d-%m %R", /* YYYY-dd-mm HH:MM */
|
||||
"%d-%m-%Y %T", /* dd-mm-YYYY HH:MM:SS */
|
||||
"%d-%m-%Y %R", /* dd-mm-YYYY HH:MM */
|
||||
"%d-%m-%Y %r", /* dd-mm-YYYY HH:MM:SS a.m. */
|
||||
"%d-%m-%Y %I:%M %p", /* dd-mm-YYYY HH:MM p.m. */
|
||||
"%d.%m.%Y %T", /* dd.mm.YYYY HH:MM:SS */
|
||||
"%d.%m.%Y %R", /* dd.mm.YYYY HH:MM */
|
||||
"%d.%m.%Y %r", /* dd.mm.YYYY HH:MM:SS a.m. */
|
||||
"%d.%m.%Y %I:%M %p", /* dd.mm.YYYY HH:MM p.m. */
|
||||
0
|
||||
};
|
||||
|
||||
static void
|
||||
inittime (time_t *clock, struct tm *timeptr)
|
||||
{
|
||||
timeptr = localtime (clock); /* for now */
|
||||
|
||||
/* but default to midnight */
|
||||
timeptr->tm_hour = timeptr->tm_min = timeptr->tm_sec = 0;
|
||||
/* and let the system figure out the right DST offset */
|
||||
timeptr->tm_isdst = -1;
|
||||
}
|
||||
|
||||
int
|
||||
strptime_builtin (WORD_LIST *list)
|
||||
{
|
||||
char *s;
|
||||
struct tm t, *tm;
|
||||
time_t now, secs;
|
||||
char *datestr;
|
||||
int i;
|
||||
|
||||
if (no_options (list)) /* for now */
|
||||
return (EX_USAGE);
|
||||
|
||||
list = loptend;
|
||||
if (list == 0)
|
||||
{
|
||||
builtin_usage ();
|
||||
return (EX_USAGE);
|
||||
}
|
||||
|
||||
datestr = string_list (list);
|
||||
if (datestr == 0 || *datestr == 0)
|
||||
return (EXECUTION_SUCCESS);
|
||||
|
||||
now = getnow ();
|
||||
secs = -1;
|
||||
for (i = 0; date_time_modifiers[i].shorthand; i++)
|
||||
{
|
||||
if (STREQ (datestr, date_time_modifiers[i].shorthand))
|
||||
{
|
||||
secs = now + date_time_modifiers[i].incr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (secs == -1)
|
||||
{
|
||||
/* init struct tm */
|
||||
inittime (&now, tm);
|
||||
t = *tm;
|
||||
for (i = 0; date_time_formats[i]; i++)
|
||||
{
|
||||
s = strptime (datestr, date_time_formats[i], &t);
|
||||
if (s == 0)
|
||||
continue;
|
||||
/* skip extra characters at the end for now */
|
||||
secs = mktime (&t);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
printf ("%ld\n", secs);
|
||||
return (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
char *strptime_doc[] = {
|
||||
"Convert a date-time string to seconds since the epoch.",
|
||||
"",
|
||||
"Take DATE-TIME, a date-time string, parse it against a set of common",
|
||||
"date-time formats. If the string matches one of the formats, convert",
|
||||
"it into seconds since the epoch and display the result.",
|
||||
(char *)NULL
|
||||
};
|
||||
|
||||
/* The standard structure describing a builtin command. bash keeps an array
|
||||
of these structures. The flags must include BUILTIN_ENABLED so the
|
||||
builtin can be used. */
|
||||
struct builtin strptime_struct = {
|
||||
"strptime", /* builtin name */
|
||||
strptime_builtin, /* function implementing the builtin */
|
||||
BUILTIN_ENABLED, /* initial flags for builtin */
|
||||
strptime_doc, /* array of long documentation strings. */
|
||||
"strptime date-time", /* usage synopsis; becomes short_doc */
|
||||
0 /* reserved for internal use */
|
||||
};
|
||||
@@ -63,7 +63,7 @@ ARFLAGS = @ARFLAGS@
|
||||
LOCAL_DEFS = @LOCAL_DEFS@
|
||||
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
||||
-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL -DBUILDING_LIBINTL
|
||||
-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL -DBUILDING_LIBINTL @DEFS@
|
||||
|
||||
# XXX - use this?
|
||||
RELOCATABLE_DEFS = -DENABLE_RELOCATABLE=1 -DIN_LIBRARY \
|
||||
|
||||
@@ -290,7 +290,7 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
|
||||
static size_t
|
||||
wctomb_fallback (char *s, wchar_t wc)
|
||||
{
|
||||
static char hex[16] = "0123456789ABCDEF";
|
||||
static char const hex[16] = "0123456789ABCDEF";
|
||||
|
||||
s[0] = '\\';
|
||||
if (sizeof (wchar_t) > 2 && wc > 0xffff)
|
||||
|
||||
@@ -997,10 +997,13 @@ internal_free (PTR_T mem, const char *file, int line, int flags)
|
||||
#if defined (USE_MMAP)
|
||||
if (nunits > malloc_mmap_threshold)
|
||||
{
|
||||
int o;
|
||||
o = errno;
|
||||
munmap (p, binsize (nunits));
|
||||
#if defined (MALLOC_STATS)
|
||||
_mstats.nlesscore[nunits]++;
|
||||
#endif
|
||||
errno = o; /* POSIX says free preserves errno */
|
||||
goto free_return;
|
||||
}
|
||||
#endif
|
||||
@@ -1015,7 +1018,10 @@ internal_free (PTR_T mem, const char *file, int line, int flags)
|
||||
there's already a block on the free list. */
|
||||
if ((nunits >= LESSCORE_FRC) || busy[nunits] || nextf[nunits] != 0)
|
||||
{
|
||||
int o;
|
||||
o = errno;
|
||||
lesscore (nunits);
|
||||
errno = o;
|
||||
/* keeps the tracing and registering code in one place */
|
||||
goto free_return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Copyright (C) 2023 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
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/>.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined (HAVE_BRK) && !defined (HAVE_SBRK)
|
||||
|
||||
static void *initialbrk;
|
||||
static void *curbrk;
|
||||
|
||||
static int
|
||||
brkinit (void)
|
||||
{
|
||||
if (initialbrk == 0)
|
||||
{
|
||||
void *b;
|
||||
|
||||
b = brk (NULL);
|
||||
if (b == (void *)-1)
|
||||
return -1;
|
||||
initialbrk = curbrk = b;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* sbrk(3) implementation in terms of brk(2). Good enough for malloc to use. */
|
||||
void *
|
||||
sbrk (intptr_t incr)
|
||||
{
|
||||
void *newbrk, *oldbrk;
|
||||
|
||||
if (initialbrk == 0 && initbrk () == -1)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return (void *)-1;
|
||||
}
|
||||
|
||||
if (incr == 0)
|
||||
return curbrk;
|
||||
|
||||
/* bounds checking, overflow */
|
||||
if ((incr > 0 && (uintptr_t) curbrk + incr < (uintptr_t) curbrk) ||
|
||||
(incr < 0 && (uintptr_t) curbrk + incr > (uintptr_t) curbrk))
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return (void *)-1;
|
||||
}
|
||||
|
||||
newbrk = curbrk + incr;
|
||||
if (newbrk < initialbrk)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return (void *)-1;
|
||||
}
|
||||
|
||||
if (brk (newbrk) == (void *)-1)
|
||||
return (void *)-1; /* preserve errno */
|
||||
|
||||
oldbrk = curbrk;
|
||||
curbrk = newbrk;
|
||||
|
||||
return (oldbrk);
|
||||
}
|
||||
#endif /* HAVE_BRK && !HAVE_SBRK */
|
||||
@@ -2190,7 +2190,8 @@ rl_complete_internal (int what_to_do)
|
||||
}
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case '%':
|
||||
case '%': /* used by menu_complete */
|
||||
case '|': /* add this for unconditional display */
|
||||
do_display = 1;
|
||||
break;
|
||||
|
||||
|
||||
+2
-2
@@ -54,8 +54,8 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#define x_digs "0123456789abcdef"
|
||||
#define X_digs "0123456789ABCDEF"
|
||||
static char const x_digs[16] = "0123456789abcdef";
|
||||
static char const X_digs[16] = "0123456789ABCDEF";
|
||||
|
||||
static char * const all_digs = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_";
|
||||
|
||||
|
||||
@@ -173,9 +173,6 @@ extern char *fmtullong (unsigned long long int, int, char *, size_t, int);
|
||||
|
||||
#define ASBUFSIZE 128
|
||||
|
||||
#define x_digs "0123456789abcdef"
|
||||
#define X_digs "0123456789ABCDEF"
|
||||
|
||||
static char intbuf[INT_STRLEN_BOUND(unsigned long) + 1];
|
||||
|
||||
static int decpoint;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# Eugen Hoanca <eugenh@urban-grafx.ro>, 2003.
|
||||
# Daniel Șerbănescu <daniel@serbanescu.dk>, 2019.
|
||||
# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022.
|
||||
# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022 - 2023.
|
||||
#
|
||||
# Cronologia traducerii fișierului „bash”:
|
||||
# Traducerea inițială, făcută de EH, pentru versiunea bash 3.2 (19% - tradus).
|
||||
@@ -12,13 +12,15 @@
|
||||
# Actualizare a traducerii pentru versiunea 5.0, făcută de DȘ (29% - tradus).
|
||||
# Actualizare a traducerii pentru versiunea 5.1, făcută de R-GC (100% - tradus).
|
||||
# Actualizare a traducerii pentru versiunea 5.2-rc1, făcută de R-GC.
|
||||
# Corectare a unei greșeli de dactilografiere prezentă din versiunea 5.1, făcută de R-GC, noi-2023.
|
||||
# Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul).
|
||||
#
|
||||
msgid ""
|
||||
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-18 01:02+0200\n"
|
||||
"PO-Revision-Date: 2023-11-14 18:38+0100\n"
|
||||
"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
|
||||
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
|
||||
"Language: ro\n"
|
||||
@@ -27,7 +29,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || ((n%100) > 0 && (n%100) < 20)) ? 1 : 2);\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 2.3.1\n"
|
||||
"X-Generator: Poedit 3.2.2\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: arrayfunc.c:66
|
||||
@@ -4839,7 +4841,7 @@ msgstr ""
|
||||
" ȘIR1 = ȘIR2 Adevărat dacă șirurile sunt egale.\n"
|
||||
" ȘIR1 != ȘIR2 Adevărat dacă șirurile nu sunt egale.\n"
|
||||
" ȘIR1 < ȘIR2 Adevărat dacă ȘIR1 se ordonează lexicografic înainte de ȘIR2.\n"
|
||||
" ȘIR1 > ȘIR2 Adevărat dacă ȘIR1 se ordonează lexicografic după ȘIR2.n\n"
|
||||
" ȘIR1 > ȘIR2 Adevărat dacă ȘIR1 se ordonează lexicografic după ȘIR2.\n"
|
||||
" \n"
|
||||
" Alți operatori:\n"
|
||||
" \n"
|
||||
|
||||
Reference in New Issue
Block a user