From: Chet Ramey Date: Fri, 16 May 2014 18:18:15 +0000 (-0400) Subject: Bash-4.3 patch 15 X-Git-Tag: bash-4.4~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6dcdf4d7a53d07ecac4973b5fe6f8074bc10819;p=thirdparty%2Fbash.git Bash-4.3 patch 15 --- 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_ */