From c6dcdf4d7a53d07ecac4973b5fe6f8074bc10819 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Fri, 16 May 2014 14:18:15 -0400 Subject: [PATCH] Bash-4.3 patch 15 --- bashline.c | 11 +++++++++-- patchlevel.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bashline.c b/bashline.c index 1f127644a..77ca033f2 100644 --- 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; diff --git a/patchlevel.h b/patchlevel.h index 20a826746..27edd5788 100644 --- 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_ */ -- 2.47.2