summaryrefslogtreecommitdiff
path: root/debian/patches/bash43-015.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/bash43-015.diff')
-rw-r--r--debian/patches/bash43-015.diff54
1 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/bash43-015.diff b/debian/patches/bash43-015.diff
new file mode 100644
index 0000000..3995eb8
--- /dev/null
+++ b/debian/patches/bash43-015.diff
@@ -0,0 +1,54 @@
+# DP: bash43-015 upstream patch
+
+ 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'):
+Index: b/bashline.c
+===================================================================
+--- a/bashline.c
++++ b/bashline.c
+@@ -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: b/patchlevel.h
+===================================================================
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -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_ */