- parameter_brace_expand_rhs,expand_declaration_argument,
do_assignment_statements: call posix_variable_assignment_error or
bash_variable_assignment_error as appropriate
+
+ 8/21
+ ----
+lib/readline/misc.c
+ - _rl_arg_dispatch: add the digits or other characters to
+ rl_executing_keyseq if we're not calling _rl_dispatch.
+ From a report by Grisha Levit <grishalevit@gmail.com>
+
+print_cmd.c
+ - print_simple_command: make sure that the_printed_command[0] == '\0'
+ if we're printing a null simple command with no words
+ Patch by Grisha Levit <grishalevit@gmail.com>
+
+ 8/22
+ ----
+builtins/read.def
+ - read_builtin: make `delim' variable local, pass to edit_line to
+ set the last character of the returned line; change edit_line
+ prototype.
+ From a suggestion by Grisha Levit <grishalevit@gmail.com>
+
+ 8/23
+ ----
+parse.y
+ - comsub and funsub productions: don't reset eof_encountered to 0 in
+ the action
+
+subst.c
+ - function_substitute: unwind-protect eof_encountered so ignoreeof
+ doesn't keep getting reset to 0 if PS1 includes a ${ ...;} command.
+ From a report by Grisha Levit <grishalevit@gmail.com>
#if defined (READLINE)
static void uw_reset_attempted_completion_function (void *);
static int set_itext (void);
-static char *edit_line (char *, char *, int);
+static char *edit_line (char *, char *, unsigned char, int);
static void set_eol_delim (int);
static void reset_eol_delim (void *);
static void set_readline_timeout (sh_timer *t, time_t, long);
sh_timer *read_timeout;
static int reading, tty_modified;
-static unsigned char delim;
static struct ttsave termsave;
long ival, uval;
intmax_t intval;
char c;
+ unsigned char delim;
char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
char *e, *t, *t1, *ps2, *tofree;
struct stat tsb;
/* USE_VAR(raw); */
USE_VAR(edit);
USE_VAR(use_bash_completion);
+ USE_VAR(delim);
USE_VAR(tmsec);
USE_VAR(tmusec);
USE_VAR(nchars);
if (rlbuf == 0)
{
reading = 1;
- rlbuf = edit_line (prompt ? prompt : "", itext, use_bash_completion);
+ rlbuf = edit_line (prompt ? prompt : "", itext, delim, use_bash_completion);
reading = 0;
rlind = 0;
}
}
static char *
-edit_line (char *p, char *itext, int keep_completion_func)
+edit_line (char *p, char *itext, unsigned char delim, int keep_completion_func)
{
char *ret;
size_t len;
/* Remember what this command line looks like at invocation. */
command_string_index = 0;
+ if (the_printed_command)
+ the_printed_command[0] = '\0';
print_simple_command (simple_command);
#if 0
if (_rl_digit_p (c))
{
+ _rl_add_executing_keyseq (key);
r = _rl_digit_value (c);
rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r;
rl_explicit_arg = 1;
}
else if (c == '-' && rl_explicit_arg == 0)
{
+ _rl_add_executing_keyseq (key);
rl_numeric_arg = 1;
_rl_argcxt |= NUM_SAWMINUS;
rl_arg_sign = -1;
_rl_add_executing_keyseq (int key)
{
RESIZE_KEYSEQ_BUFFER ();
- rl_executing_keyseq[rl_key_sequence_length++] = key;
+ rl_executing_keyseq[rl_key_sequence_length++] = key;
}
/* `delete' the last character added to the executing key sequence. Use this
/* This is special; look at the production and how
parse_comsub sets token_to_read */
global_command = $1;
- eof_encountered = 0;
YYACCEPT;
}
| funsub
/* This is special; look at the production and how
parse_comsub/parse_valsub sets token_to_read */
global_command = $1;
- eof_encountered = 0;
YYACCEPT;
}
| '\n'
{
if (simple_command->words)
command_print_word_list (simple_command->words, " ");
+ else
+ cprintf ("");
if (simple_command->redirects)
{
unwind_protect_pointer (subst_assign_varlist);
unwind_protect_pointer (temporary_env);
unwind_protect_pointer (this_shell_function);
+ unwind_protect_int (eof_encountered);
add_unwind_protect (uw_pop_var_context, 0);
#if defined (ARRAY_VARS)