mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 18:30:49 +02:00
commit bash-20100108 snapshot
This commit is contained in:
@@ -9324,3 +9324,39 @@ doc/bash.1
|
||||
<doko@debian.org>
|
||||
|
||||
[bash-4.1 frozen]
|
||||
|
||||
12/31
|
||||
-----
|
||||
[bash-4.1 released]
|
||||
|
||||
1/5/2010
|
||||
--------
|
||||
doc/bashref.texi
|
||||
- document compat32 and compat40 shopt options. Omission pointed out
|
||||
by Dilyan Palauzov <Dilyan.Palauzov@aegee.org>
|
||||
|
||||
1/6
|
||||
---
|
||||
lib/readline/complete.c
|
||||
- use `convfn' (converted filename) instead of entry->d_name (filename
|
||||
read from file system) when adding partial or full completions to
|
||||
the command line. Bug and fix from Guillaume Outters
|
||||
<guillaume.outters@free.fr>
|
||||
|
||||
1/7
|
||||
---
|
||||
builtins/printf.def
|
||||
- fix prototype in extern declaration for vsnprintf. Fix for bug
|
||||
reported by Yann Rouillard <yann@pleiades.fr.eu.org>
|
||||
|
||||
1/9
|
||||
---
|
||||
parse.y
|
||||
- fix shell_getc to handle alias expansions containing quoted
|
||||
newlines. Problems in bash-4.1 with aliases containing quoted
|
||||
newlines in the middle of and at the end of their expansion.
|
||||
Fix for bug reported by Jonathan Claggett
|
||||
<jonathan@claggett.org>
|
||||
- change mk_alexpansion to not append a space to an alias
|
||||
expansion ending with a newline. Works with shell_getc
|
||||
|
||||
|
||||
+9346
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -162,7 +162,7 @@ resetpwd (caller)
|
||||
#define LCD_DOVARS 0x001
|
||||
#define LCD_DOSPELL 0x002
|
||||
#define LCD_PRINTPATH 0x004
|
||||
#define LCD_FREEDIRNAME 0x010
|
||||
#define LCD_FREEDIRNAME 0x008
|
||||
|
||||
/* This builtin is ultimately the way that all user-visible commands should
|
||||
change the current working directory. It is called by cd_to_string (),
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__
|
||||
#endif
|
||||
|
||||
#if !HAVE_VSNPRINTF
|
||||
extern int vsnprintf __P((char *, size_t, const char *, ...)) __attribute__((__format__ (printf, 3, 4)));
|
||||
extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
|
||||
#endif
|
||||
|
||||
static void printf_erange __P((char *));
|
||||
|
||||
@@ -4363,6 +4363,17 @@ If set, Bash
|
||||
changes its behavior to that of version 3.1 with respect to quoted
|
||||
arguments to the conditional command's =~ operator.
|
||||
|
||||
@item compat32
|
||||
If set, Bash
|
||||
changes its behavior to that of version 3.2 with respect to locale-specific
|
||||
string comparison when using the conditional command's < and > operators.
|
||||
|
||||
@item compat40
|
||||
If set, Bash
|
||||
changes its behavior to that of version 4.0 with respect to locale-specific
|
||||
string comparison when using the conditional command's < and > operators
|
||||
and the effect of interrupting a command list.
|
||||
|
||||
@item dirspell
|
||||
If set, Bash
|
||||
attempts spelling correction on directory names during word completion
|
||||
|
||||
@@ -2138,7 +2138,7 @@ rl_filename_completion_function (text, state)
|
||||
All other entries except "." and ".." match. */
|
||||
if (filename_len == 0)
|
||||
{
|
||||
if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name))
|
||||
if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
|
||||
continue;
|
||||
|
||||
if (convfn[0] != '.' ||
|
||||
@@ -2219,7 +2219,7 @@ rl_filename_completion_function (text, state)
|
||||
temp[dirlen++] = '/';
|
||||
}
|
||||
|
||||
strcpy (temp + dirlen, entry->d_name);
|
||||
strcpy (temp + dirlen, convfn);
|
||||
}
|
||||
else
|
||||
temp = savestring (convfn);
|
||||
|
||||
@@ -2278,7 +2278,7 @@ shell_getc (remove_quoted_newline)
|
||||
shell_input_line = expansions;
|
||||
shell_input_line_len = shell_input_line ?
|
||||
strlen (shell_input_line) : 0;
|
||||
if (!shell_input_line_len)
|
||||
if (shell_input_line_len == 0)
|
||||
current_command_line_count--;
|
||||
|
||||
/* We have to force the xrealloc below because we don't know
|
||||
@@ -2343,6 +2343,7 @@ shell_getc (remove_quoted_newline)
|
||||
}
|
||||
}
|
||||
|
||||
next_alias_char:
|
||||
uc = shell_input_line[shell_input_line_index];
|
||||
|
||||
if (uc)
|
||||
@@ -2355,7 +2356,7 @@ shell_getc (remove_quoted_newline)
|
||||
Do it transparently; just return the next character of the string popped
|
||||
to. */
|
||||
pop_alias:
|
||||
if (!uc && (pushed_string_list != (STRING_SAVER *)NULL))
|
||||
if (uc == 0 && (pushed_string_list != (STRING_SAVER *)NULL))
|
||||
{
|
||||
pop_string ();
|
||||
uc = shell_input_line[shell_input_line_index];
|
||||
@@ -2369,21 +2370,28 @@ pop_alias:
|
||||
if (SHOULD_PROMPT ())
|
||||
prompt_again ();
|
||||
line_number++;
|
||||
/* XXX - what do we do here if we're expanding an alias whose definition
|
||||
ends with a newline? Recall that we inhibit the appending of a
|
||||
space in mk_alexpansion() if newline is the last character. */
|
||||
#if 0 /* XXX - bash-4.2 (jonathan@claggett.org) */
|
||||
/* What do we do here if we're expanding an alias whose definition
|
||||
includes an escaped newline? If that's the last character in the
|
||||
alias expansion, we just pop the pushed string list (recall that
|
||||
we inhibit the appending of a space in mk_alexpansion() if newline
|
||||
is the last character). If it's not the last character, we need
|
||||
to consume the quoted newline and move to the next character in
|
||||
the expansion. */
|
||||
if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0')
|
||||
{
|
||||
uc = 0;
|
||||
goto pop_alias;
|
||||
}
|
||||
#endif
|
||||
|
||||
goto restart_read;
|
||||
else if (expanding_alias () && shell_input_line[shell_input_line_index+1] != '\0')
|
||||
{
|
||||
shell_input_line_index++; /* skip newline */
|
||||
goto next_alias_char; /* and get next character */
|
||||
}
|
||||
else
|
||||
goto restart_read;
|
||||
}
|
||||
|
||||
if (!uc && shell_input_line_terminator == EOF)
|
||||
if (uc == 0 && shell_input_line_terminator == EOF)
|
||||
return ((shell_input_line_index != 0) ? '\n' : EOF);
|
||||
|
||||
return (uc);
|
||||
@@ -2590,11 +2598,9 @@ mk_alexpansion (s)
|
||||
l = strlen (s);
|
||||
r = xmalloc (l + 2);
|
||||
strcpy (r, s);
|
||||
#if 0 /* XXX - bash-4.2 */
|
||||
if (r[l -1] != ' ' && r[l -1] != '\n')
|
||||
#else
|
||||
if (r[l -1] != ' ')
|
||||
#endif
|
||||
/* If the last character in the alias is a newline, don't add a trailing
|
||||
space to the expansion. Works with shell_getc above. */
|
||||
if (r[l - 1] != ' ' && r[l - 1] != '\n')
|
||||
r[l++] = ' ';
|
||||
r[l] = '\0';
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user