bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash-4.0 Official Patch 35


From: Chet Ramey
Subject: Bash-4.0 Official Patch 35
Date: Thu, 29 Oct 2009 09:55:46 -0400

                             BASH PATCH REPORT
                             =================

Bash-Release:   4.0
Patch-ID:       bash40-035

Bug-Reported-by:        Freddy Vulto <fvulto@gmail.com>
Bug-Reference-ID:       
<e9c463930909171341p7cbe6e43pa3788ebbe3adec4d@mail.gmail.com>
Bug-Reference-URL:      
http://lists.gnu.org/archive/html/bug-bash/2009-09/msg00044.html

Bug-Description:

Bash-4.0 incorrectly treated single and double quotes as delimiters rather
than introducing quoted strings when splitting the line into words for
programmable completion functions.

Patch:

*** ../bash-4.0-patched/pcomplete.c     2009-03-08 21:24:31.000000000 -0400
--- pcomplete.c 2009-09-26 16:30:16.000000000 -0400
***************
*** 1176,1186 ****
    WORD_LIST *ret;
    char *delims;
  
! #if 0
!   delims = "()<>;&| \t\n";    /* shell metacharacters break words */
! #else
!   delims = rl_completer_word_break_characters;
! #endif
    ret = split_at_delims (line, llen, delims, sentinel, nwp, cwp);
    return (ret);
  }
--- 1176,1188 ----
    WORD_LIST *ret;
    char *delims;
+   int i, j;
  
!   delims = xmalloc (strlen (rl_completer_word_break_characters) + 1);
!   for (i = j = 0; rl_completer_word_break_characters[i]; i++)
!     if (rl_completer_word_break_characters[i] != '\'' && 
rl_completer_word_break_characters[i] != '"')
!       delims[j++] = rl_completer_word_break_characters[i];
!   delims[j] = '\0';
    ret = split_at_delims (line, llen, delims, sentinel, nwp, cwp);
+   free (delims);
    return (ret);
  }
*** ../bash-4.0/patchlevel.h    2009-01-04 14:32:40.000000000 -0500
--- patchlevel.h        2009-02-22 16:11:31.000000000 -0500
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 34
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 35
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]