lib/readline/doc/rluser.texi
- execute-named-command: document as bindable function name with its
default binding to M-x in emacs mode
+
+ 11/6
+ ----
+lib/readline/search.c
+ - _rl_nsearch_dispatch: use ^V/^Q for rl_quoted_insert into the
+ search string
+
+lib/readline/isearch.c
+ - _rl_isearch_dispatch: use ^V or anything bound to rl_quoted_insert
+ for rl_quoted_insert into the search string
+
+lib/readline/terminal.c
+ - add support for new BE/BD and PS/PE bracketed-paste capabilities.
+ Nothing uses them yet.
+
+ 11/10
+ -----
+builtins/enable.def
+ - dyn_load_builtin: if we don't find a pathname argument without a
+ 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).
Without options, each NAME is enabled.
+On systems with dynamic loading, the shell variable BASH_LOADABLES_PATH
+defines a search path for the directory containing FILENAMEs that do
+not contain a slash. It may include "." to force a search of the current
+directory.
+
To use the `test' found in $PATH instead of the shell builtin
version, type `enable -n test'.
/* Fall back to current directory for now */
if (handle == 0)
+ {
+ char *openname;
+
+ openname = absolute_program (filename) ? filename : make_absolute (filename, ".");
#if defined (_AIX)
- handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL);
+ handle = dlopen (openname, RTLD_NOW|RTLD_GLOBAL);
#else
- handle = dlopen (filename, RTLD_LAZY);
+ handle = dlopen (openname, RTLD_LAZY);
#endif /* !_AIX */
+ if (openname != filename)
+ free (openname);
+ }
if (handle == 0)
{
/* The builtin commands that are special to the POSIX search order. */
char *posix_builtins[] =
{
- "alias", "bg", "cd", "command", "false", "fc", "fg", "getopts", "jobs",
- "kill", "newgrp", "pwd", "read", "true", "umask", "unalias", "wait",
+ "alias", "bg", "cd", "command", "false", "fc", "fg", "getopts", "hash",
+ "jobs", "kill", "newgrp", "pwd", "read", "true", "type", "ulimit",
+ "umask", "unalias", "wait",
(char *)NULL
};
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Wed Nov 1 09:34:21 EDT 2023
+.\" Last Change: Mon Nov 6 10:19:40 EST 2023
.\"
.\" bash_builtins, strip all but Built-Ins section
.\" avoid a warning about an undefined register
.\" .if !rzY .nr zY 0
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2023 November 1" "GNU Bash 5.3"
+.TH BASH 1 "2023 November 6" "GNU Bash 5.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
.IR filename ,
on systems that support dynamic loading.
\fBBash\fP will use the value of the \fBBASH_LOADABLES_PATH\fP variable as a
-colon-separated list of directories in which to search for \fIfilename\fP.
-The default is system-dependent.
+colon-separated list of directories in which to search for \fIfilename\fP,
+if \fIfilename\fP does not contain a slash.
+The default is system-dependent,
+and may include "." to force a search of the current directory.
The
.B \-d
option will delete a builtin previously loaded with
If the string is not translated, this has no effect.
.TP 8
.B nullglob
-If set,
-.B bash
-allows patterns which match no
-files (see
+If set, pathname expansion patterns which match no files
+(see
.B Pathname Expansion
.ie \n(zZ=1 in \fIbash(1)\fP)
.el above)
-to expand to a null string, rather than themselves.
+expand to nothing and are removed,
+rather than expanding to themselves.
.TP 8
.B patsub_replacement
If set, \fBbash\fP
The @option{-f} option means to load the new builtin command @var{name}
from shared object @var{filename}, on systems that support dynamic loading.
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 is system-dependent.
+colon-separated list of directories in which to search for @var{filename},
+if @var{filename} does not contain a slash.
+The default is system-dependent,
+and may include "." to force a search of the current directory.
The @option{-d} option will delete a builtin loaded with @option{-f}.
If there are no options, a list of the shell builtins is displayed.
If the string is not translated, this has no effect.
@item 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
+(@pxref{Filename Expansion})
+expand to nothing and are removed,
+rather than expanding to themselves.
@item patsub_replacement
If set, Bash
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Wed Nov 1 09:34:00 EDT 2023
+@set LASTCHANGE Mon Nov 6 10:19:14 EST 2023
@set EDITION 5.3
@set VERSION 5.3
-@set UPDATED 1 November 2023
+@set UPDATED 6 November 2023
@set UPDATED-MONTH November 2023
if (array_name == 0)
array_name = CSV_ARRAY_DEFAULT;
- if (legal_identifier (array_name) == 0)
+ if (valid_identifier (array_name) == 0)
{
sh_invalidid (array_name);
return (EXECUTION_FAILURE);
/* declarations for functions defined in lib/sh/zwrite.c */
extern int zwrite (int, char *, size_t);
+/* compatibility functions for existing loadable builtins, from compat.c */
+extern int legal_number (const char *, intmax_t *);
+extern int legal_identifier (const char *);
+extern int legal_alias_name (const char *, int);
+
/* declarations for functions defined in lib/glob/gmisc.c */
extern int match_pattern_char (char *, char *, int);
extern int umatchlen (char *, size_t);
cxt->lastc = -6;
else if (f == rl_bracketed_paste_begin)
cxt->lastc = -7;
+ else if (c == CTRL('V') || f == rl_quoted_insert)
+ cxt->lastc = -8;
}
/* If we changed the keymap earlier while translating a key sequence into
xfree (paste);
break;
+ case -8: /* quoted insert */
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_disable_tty_signals ();
+#endif
+ c = _rl_search_getchar (cxt);
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_restore_tty_signals ();
+#endif
+
+ if (c < 0)
+ {
+ cxt->sflags |= SF_FAILED;
+ cxt->history_pos = cxt->last_found_line;
+ return -1;
+ }
+
+ _rl_add_executing_keyseq (c);
+
+ /*FALLTHROUGH*/
/* Add character to search string and continue search. */
default:
#if defined (HANDLE_MULTIBYTE)
rl_unix_line_discard (1, c);
break;
+ case CTRL('Q'):
+ case CTRL('V'):
+ n = rl_quoted_insert (1, c);
+ if (n < 0)
+ {
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ cxt->lastc = (rl_point > 0) ? rl_line_buffer[rl_point - 1] : rl_line_buffer[0];
+ break;
+
case RETURN:
case NEWLINE:
return 0;
static char *_rl_term_vs; /* very visible */
static char *_rl_term_ve; /* normal */
+/* Bracketed paste */
+static char *_rl_term_BE; /* enable */
+static char *_rl_term_BD; /* disable */
+static char *_rl_term_PS; /* paste start */
+static char *_rl_term_PE; /* paste end */
+
/* User-settable color sequences to begin and end the active region. Defaults
are rl_term_so and rl_term_se on non-dumb terminals. */
char *_rl_active_region_start_color = NULL;
static const struct _tc_string tc_strings[] =
{
{ "@7", &_rl_term_at7 },
+ { "BD", &_rl_term_BD },
+ { "BE", &_rl_term_BE },
{ "DC", &_rl_term_DC },
{ "E3", &_rl_term_clrscroll },
{ "IC", &_rl_term_IC },
+ { "PE", &_rl_term_PE },
+ { "PS", &_rl_term_PS },
{ "ce", &_rl_term_clreol },
{ "cl", &_rl_term_clrpag },
{ "cr", &_rl_term_cr },
_rl_term_kh = _rl_term_kH = _rl_term_at7 = _rl_term_kI = (char *)NULL;
_rl_term_kN = _rl_term_kP = (char *)NULL;
_rl_term_so = _rl_term_se = (char *)NULL;
+ _rl_term_BD = _rl_term_BE = _rl_term_PE = _rl_term_PS = (char *)NULL;
#if defined(HACK_TERMCAP_MOTION)
_rl_term_forward_char = (char *)NULL;
#endif
/* Assume generic unknown terminal can't handle the enable/disable
escape sequences */
+ _rl_term_BD = _rl_term_BE = _rl_term_PE = _rl_term_PS = (char *)NULL;
_rl_enable_bracketed_paste = 0;
/* No terminal so/se capabilities. */
_rl_readstr_restore (cxt);
return -1;
}
- cxt->lastc = rl_line_buffer[rl_point - 1]; /* preserve prevc */
+ cxt->lastc = (rl_point > 0) ? rl_line_buffer[rl_point - 1] : rl_line_buffer[0]; /* preserve prevc */
break;
case RETURN:
{
return (valid_alias_name (string, flags));
}
+
+int
+compat_init (void)
+{
+ return 0;
+}