mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-16 00:20:49 +02:00
commit bash-20191213 snapshot
This commit is contained in:
@@ -164,7 +164,7 @@ When editing is complete, the edited commands are echoed and executed.
|
||||
|
||||
In the second form, @var{command} is re-executed after each instance
|
||||
of @var{pat} in the selected command is replaced by @var{rep}.
|
||||
@var{command} is intepreted the same as @var{first} above.
|
||||
@var{command} is interpreted the same as @var{first} above.
|
||||
|
||||
A useful alias to use with the @code{fc} command is @code{r='fc -s'}, so
|
||||
that typing @samp{r cc} runs the last command beginning with @code{cc}
|
||||
|
||||
@@ -2042,7 +2042,7 @@ remove any quote characters from the directory name, because its result will
|
||||
be passed directly to @code{opendir()}.
|
||||
|
||||
The directory rewrite hook returns an integer that should be non-zero if
|
||||
the function modfies its directory argument.
|
||||
the function modifies its directory argument.
|
||||
The function should not modify the directory argument if it returns 0.
|
||||
@end deftypevar
|
||||
|
||||
@@ -2054,7 +2054,7 @@ is passed to @code{stat()} to determine the file's type and characteristics.
|
||||
This function does not need to remove quote characters from the filename.
|
||||
|
||||
The stat hook returns an integer that should be non-zero if
|
||||
the function modfies its directory argument.
|
||||
the function modifies its directory argument.
|
||||
The function should not modify the directory argument if it returns 0.
|
||||
@end deftypevar
|
||||
|
||||
@@ -2648,7 +2648,7 @@ com_help (arg)
|
||||
|
||||
if (!printed)
|
||||
@{
|
||||
printf ("No commands match `%s'. Possibilties are:\n", arg);
|
||||
printf ("No commands match `%s'. Possibilities are:\n", arg);
|
||||
|
||||
for (i = 0; commands[i].name; i++)
|
||||
@{
|
||||
|
||||
@@ -417,7 +417,7 @@ com_help (arg)
|
||||
|
||||
if (!printed)
|
||||
{
|
||||
printf ("No commands match `%s'. Possibilties are:\n", arg);
|
||||
printf ("No commands match `%s'. Possibilities are:\n", arg);
|
||||
|
||||
for (i = 0; commands[i].name; i++)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ char history_expansion_char = '!';
|
||||
char history_subst_char = '^';
|
||||
|
||||
/* During tokenization, if this character is seen as the first character
|
||||
of a word, then it, and all subsequent characters upto a newline are
|
||||
of a word, then it, and all subsequent characters up to a newline are
|
||||
ignored. For a Bourne shell, this should be '#'. Bash special cases
|
||||
the interactive comment character to not be a comment delimiter. */
|
||||
char history_comment_char = '\0';
|
||||
|
||||
@@ -391,7 +391,12 @@ add_character:
|
||||
/* Translate the keys we do something with to opcodes. */
|
||||
if (c >= 0 && cxt->keymap[c].type == ISFUNC)
|
||||
{
|
||||
f = cxt->keymap[c].function;
|
||||
/* If we have a multibyte character, see if it's bound to something that
|
||||
affects the search. */
|
||||
if (cxt->mb[1])
|
||||
f = rl_function_of_keyseq (cxt->mb, cxt->keymap, (int *)NULL);
|
||||
else
|
||||
f = cxt->keymap[c].function;
|
||||
|
||||
if (f == rl_reverse_search_history)
|
||||
cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../../include/posixdir.h
|
||||
@@ -0,0 +1,71 @@
|
||||
/* posixdir.h -- Posix directory reading includes and defines. */
|
||||
|
||||
/* Copyright (C) 1987,1991,2012 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/>.
|
||||
*/
|
||||
|
||||
/* This file should be included instead of <dirent.h> or <sys/dir.h>. */
|
||||
|
||||
#if !defined (_POSIXDIR_H_)
|
||||
#define _POSIXDIR_H_
|
||||
|
||||
#if defined (HAVE_DIRENT_H)
|
||||
# include <dirent.h>
|
||||
# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN)
|
||||
# define D_NAMLEN(d) ((d)->d_namlen)
|
||||
# else
|
||||
# define D_NAMLEN(d) (strlen ((d)->d_name))
|
||||
# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */
|
||||
#else
|
||||
# if defined (HAVE_SYS_NDIR_H)
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# if defined (HAVE_SYS_DIR_H)
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if defined (HAVE_NDIR_H)
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
# if !defined (dirent)
|
||||
# define dirent direct
|
||||
# endif /* !dirent */
|
||||
# define D_NAMLEN(d) ((d)->d_namlen)
|
||||
#endif /* !HAVE_DIRENT_H */
|
||||
|
||||
/* The bash code fairly consistently uses d_fileno; make sure it's available */
|
||||
#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
|
||||
# define d_fileno d_ino
|
||||
#endif
|
||||
|
||||
/* Posix does not require that the d_ino field be present, and some
|
||||
systems do not provide it. */
|
||||
#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO)
|
||||
# define REAL_DIR_ENTRY(dp) 1
|
||||
#else
|
||||
# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
|
||||
#endif /* _POSIX_SOURCE */
|
||||
|
||||
#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO)
|
||||
# define D_INO_AVAILABLE
|
||||
#endif
|
||||
|
||||
/* Signal the rest of the code that it can safely use dirent.d_fileno */
|
||||
#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO)
|
||||
# define D_FILENO_AVAILABLE 1
|
||||
#endif
|
||||
|
||||
#endif /* !_POSIXDIR_H_ */
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../include/posixdir.h
|
||||
@@ -28,7 +28,7 @@
|
||||
/* check multibyte capability for I18N code */
|
||||
/************************************************/
|
||||
|
||||
/* For platforms which support the ISO C amendement 1 functionality we
|
||||
/* For platforms which support the ISO C amendment 1 functionality we
|
||||
support user defined character classes. */
|
||||
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||
#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
|
||||
|
||||
@@ -220,7 +220,7 @@ _rl_handle_signal (int sig)
|
||||
sane without stopping on SIGTTOU if we have been placed into the
|
||||
background. Even trying to get the current terminal pgrp with
|
||||
tcgetpgrp() will generate SIGTTOU, so we don't bother. Don't bother
|
||||
doing this if we've been stopped on SIGTTOU; it's aready too late. */
|
||||
doing this if we've been stopped on SIGTTOU; it's already too late. */
|
||||
sigemptyset (&set);
|
||||
sigaddset (&set, SIGTTOU);
|
||||
sigprocmask (SIG_BLOCK, &set, (sigset_t *)NULL);
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ _path_isdir (path)
|
||||
|
||||
/* Canonicalize PATH, and return a new path. The new path differs from PATH
|
||||
in that:
|
||||
Multple `/'s are collapsed to a single `/'.
|
||||
Multiple `/'s are collapsed to a single `/'.
|
||||
Leading `./'s and trailing `/.'s are removed.
|
||||
Trailing `/'s are removed.
|
||||
Non-leading `../'s and trailing `..'s are handled by removing
|
||||
|
||||
+3
-3
@@ -642,7 +642,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
|
||||
sprintf(tbuf+1, "%02ld%02ld", off/60, off%60);
|
||||
break;
|
||||
|
||||
case 'Z': /* time zone name or abbrevation */
|
||||
case 'Z': /* time zone name or abbreviation */
|
||||
#ifdef HAVE_TZNAME
|
||||
i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */
|
||||
strcpy(tbuf, tzname[i]);
|
||||
@@ -939,7 +939,7 @@ static char *array[] =
|
||||
"(%%H) hour (24-hour clock, 00..23) %H",
|
||||
"(%%I) hour (12-hour clock, 01..12) %I",
|
||||
"(%%M) minute (00..59) %M",
|
||||
"(%%N) Emporer/Era Name %N",
|
||||
"(%%N) Emperor/Era Name %N",
|
||||
"(%%O) Locale extensions (ignored) %O",
|
||||
"(%%R) time, 24-hour (%%H:%%M) %R",
|
||||
"(%%S) second (00..60) %S",
|
||||
@@ -960,7 +960,7 @@ static char *array[] =
|
||||
"(%%k) hour, 24-hour clock, blank pad ( 0..23) %k",
|
||||
"(%%l) hour, 12-hour clock, blank pad ( 0..12) %l",
|
||||
"(%%m) month (01..12) %m",
|
||||
"(%%o) Emporer/Era Year %o",
|
||||
"(%%o) Emperor/Era Year %o",
|
||||
"(%%p) locale's AM or PM based on 12-hour clock %p",
|
||||
"(%%r) time, 12-hour (same as %%I:%%M:%%S %%p) %r",
|
||||
"(%%u) ISO 8601: Weekday as decimal number [1 (Monday) - 7] %u",
|
||||
|
||||
@@ -122,7 +122,6 @@ strvec_remove (array, name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_UNUSED
|
||||
/* Find NAME in ARRAY. Return the index of NAME, or -1 if not present.
|
||||
ARRAY should be NULL terminated. */
|
||||
int
|
||||
@@ -137,7 +136,6 @@ strvec_search (array, name)
|
||||
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allocate and return a new copy of ARRAY and its contents. */
|
||||
char **
|
||||
|
||||
Reference in New Issue
Block a user