Skip to content

Commit 2b3ca7e

Browse files
author
Chet Ramey
committed
Bash-4.3 patch 41
1 parent 8d98b94 commit 2b3ca7e

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

bashline.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,10 +1468,23 @@ attempt_shell_completion (text, start, end)
14681468

14691469
os = start;
14701470
n = 0;
1471+
was_assignment = 0;
14711472
s = find_cmd_start (os);
14721473
e = find_cmd_end (end);
14731474
do
14741475
{
1476+
/* Don't read past the end of rl_line_buffer */
1477+
if (s > rl_end)
1478+
{
1479+
s1 = s = e1;
1480+
break;
1481+
}
1482+
/* Or past point if point is within an assignment statement */
1483+
else if (was_assignment && s > rl_point)
1484+
{
1485+
s1 = s = e1;
1486+
break;
1487+
}
14751488
/* Skip over assignment statements preceding a command name. If we
14761489
don't find a command name at all, we can perform command name
14771490
completion. If we find a partial command name, we should perform

lib/readline/complete.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ printable_part (pathname)
689689

690690
if (temp == 0 || *temp == '\0')
691691
return (pathname);
692+
else if (temp[1] == 0 && temp == pathname)
693+
return (pathname);
692694
/* If the basename is NULL, we might have a pathname like '/usr/src/'.
693695
Look for a previous slash and, if one is found, return the portion
694696
following that slash. If there's no previous slash, just return the

patchlevel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
2626
looks for to find the patch level (for the sccs version string). */
2727

28-
#define PATCHLEVEL 40
28+
#define PATCHLEVEL 41
2929

3030
#endif /* _PATCHLEVEL_H_ */

0 commit comments

Comments
 (0)