]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.3 patch 41
authorChet Ramey <chet.ramey@case.edu>
Thu, 13 Aug 2015 19:38:31 +0000 (15:38 -0400)
committerChet Ramey <chet.ramey@case.edu>
Thu, 13 Aug 2015 19:38:31 +0000 (15:38 -0400)
bashline.c
lib/readline/complete.c
patchlevel.h

index c87415171a4a898620f3091b519860fd26a5052d..8ff17963facfd6993815802ac02a687090f89e06 100644 (file)
@@ -1468,10 +1468,23 @@ attempt_shell_completion (text, start, end)
 
       os = start;
       n = 0;
+      was_assignment = 0;
       s = find_cmd_start (os);
       e = find_cmd_end (end);
       do
        {
+         /* Don't read past the end of rl_line_buffer */
+         if (s > rl_end)
+           {
+             s1 = s = e1;
+             break;
+           }
+         /* Or past point if point is within an assignment statement */
+         else if (was_assignment && s > rl_point)
+           {
+             s1 = s = e1;
+             break;
+           }
          /* Skip over assignment statements preceding a command name.  If we
             don't find a command name at all, we can perform command name
             completion.  If we find a partial command name, we should perform
index cd9aebe8b7f8bc21026ad836053d6c69d252d477..3d36e920f206e0e67c8e4b07195ed930f7bea2a6 100644 (file)
@@ -689,6 +689,8 @@ printable_part (pathname)
 
   if (temp == 0 || *temp == '\0')
     return (pathname);
+  else if (temp[1] == 0 && temp == pathname)
+    return (pathname);
   /* If the basename is NULL, we might have a pathname like '/usr/src/'.
      Look for a previous slash and, if one is found, return the portion
      following that slash.  If there's no previous slash, just return the
index 6b73b147eba5fa1d2b0bc8d0fb936d8c4585f4e1..44f59c772a5797e69948e468c9d8117177f75fc0 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 40
+#define PATCHLEVEL 41
 
 #endif /* _PATCHLEVEL_H_ */