Bash-4.2 patch 9
This commit is contained in:
parent
d5d0096115
commit
7aaa661d31
2 changed files with 12 additions and 4 deletions
|
|
@ -304,7 +304,7 @@ fc_builtin (list)
|
||||||
last_hist = i - rh - hist_last_line_added;
|
last_hist = i - rh - hist_last_line_added;
|
||||||
|
|
||||||
/* XXX */
|
/* XXX */
|
||||||
if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0)
|
if (i == last_hist && hlist[last_hist] == 0)
|
||||||
while (last_hist >= 0 && hlist[last_hist] == 0)
|
while (last_hist >= 0 && hlist[last_hist] == 0)
|
||||||
last_hist--;
|
last_hist--;
|
||||||
if (last_hist < 0)
|
if (last_hist < 0)
|
||||||
|
|
@ -475,7 +475,7 @@ fc_gethnum (command, hlist)
|
||||||
HIST_ENTRY **hlist;
|
HIST_ENTRY **hlist;
|
||||||
{
|
{
|
||||||
int sign, n, clen, rh;
|
int sign, n, clen, rh;
|
||||||
register int i, j;
|
register int i, j, last_hist;
|
||||||
register char *s;
|
register char *s;
|
||||||
|
|
||||||
sign = 1;
|
sign = 1;
|
||||||
|
|
@ -495,7 +495,15 @@ fc_gethnum (command, hlist)
|
||||||
has been enabled (interactive or not) should use it in the last_hist
|
has been enabled (interactive or not) should use it in the last_hist
|
||||||
calculation as if it were on. */
|
calculation as if it were on. */
|
||||||
rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
|
rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
|
||||||
i -= rh + hist_last_line_added;
|
last_hist = i - rh - hist_last_line_added;
|
||||||
|
|
||||||
|
if (i == last_hist && hlist[last_hist] == 0)
|
||||||
|
while (last_hist >= 0 && hlist[last_hist] == 0)
|
||||||
|
last_hist--;
|
||||||
|
if (last_hist < 0)
|
||||||
|
return (-1);
|
||||||
|
|
||||||
|
i = last_hist;
|
||||||
|
|
||||||
/* No specification defaults to most recent command. */
|
/* No specification defaults to most recent command. */
|
||||||
if (command == NULL)
|
if (command == NULL)
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,6 @@
|
||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||||
looks for to find the patch level (for the sccs version string). */
|
looks for to find the patch level (for the sccs version string). */
|
||||||
|
|
||||||
#define PATCHLEVEL 8
|
#define PATCHLEVEL 9
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
#endif /* _PATCHLEVEL_H_ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue