]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.3 patch 15
authorChet Ramey <chet.ramey@case.edu>
Fri, 16 May 2014 18:18:15 +0000 (14:18 -0400)
committerChet Ramey <chet.ramey@case.edu>
Fri, 16 May 2014 18:18:15 +0000 (14:18 -0400)
bashline.c
patchlevel.h

index 1f127644a6654da8394baacc54162592f8e73f22..77ca033f2cc8732c901346a2567bb1f549ae424b 100644 (file)
@@ -4167,9 +4167,16 @@ bash_directory_completion_matches (text)
   int qc;
 
   qc = rl_dispatching ? rl_completion_quote_character : 0;  
-  dfn = bash_dequote_filename ((char *)text, qc);
+  /* 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);
-  free (dfn);
+  if (dfn != text)
+    free (dfn);
 
   if (m1 == 0 || m1[0] == 0)
     return m1;
index 20a826746f181041a2d3faaa61203b9f10eb09f9..27edd578827fa030804dc7b6ad13d853c944eee0 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 14
+#define PATCHLEVEL 15
 
 #endif /* _PATCHLEVEL_H_ */