summaryrefslogtreecommitdiffstats
path: root/patches/source/bash/bash-4.3-patches/bash43-015
blob: 9c4e5ea48fc3c8b2efe60d104d3c6b5ba45b0b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.3
Patch-ID:	bash43-015

Bug-Reported-by:	Clark Wang <dearvoid@gmail.com>
Bug-Reference-ID:	<CADv8-og2TOSoabXeNVXVGaXN3tEMHnYVq1rwOLe5meaRPSGRig@mail.gmail.com>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00095.html

Bug-Description:

When completing directory names, the directory name is dequoted twice.
This causes problems for directories with single and double quotes in
their names.

Patch (apply with `patch -p0'):
*** ../bash-4.3-patched/bashline.c	2014-02-09 19:56:58.000000000 -0500
--- bashline.c	2014-04-25 14:57:52.000000000 -0400
***************
*** 4168,4174 ****
  
    qc = rl_dispatching ? rl_completion_quote_character : 0;  
!   dfn = bash_dequote_filename ((char *)text, qc);
    m1 = rl_completion_matches (dfn, rl_filename_completion_function);
!   free (dfn);
  
    if (m1 == 0 || m1[0] == 0)
--- 4209,4222 ----
  
    qc = rl_dispatching ? rl_completion_quote_character : 0;  
!   /* If rl_completion_found_quote != 0, rl_completion_matches will call the
!      filename dequoting function, causing the directory name to be dequoted
!      twice. */
!   if (rl_dispatching && rl_completion_found_quote == 0)
!     dfn = bash_dequote_filename ((char *)text, qc);
!   else
!     dfn = (char *)text;
    m1 = rl_completion_matches (dfn, rl_filename_completion_function);
!   if (dfn != text)
!     free (dfn);
  
    if (m1 == 0 || m1[0] == 0)
*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 14
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 15
  
  #endif /* _PATCHLEVEL_H_ */