components/bash/patches/bash43-015.patch
changeset 5518 c47fe0edc204
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bash/patches/bash43-015.patch	Mon Feb 29 10:09:14 2016 -0800
@@ -0,0 +1,58 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.3
+Patch-ID:	bash43-015
+
+Bug-Reported-by:	Clark Wang <[email protected]>
+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_ */