You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.5 KiB

  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-015
  5. Bug-Reported-by: Clark Wang <dearvoid@gmail.com>
  6. Bug-Reference-ID: <CADv8-og2TOSoabXeNVXVGaXN3tEMHnYVq1rwOLe5meaRPSGRig@mail.gmail.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00095.html
  8. Bug-Description:
  9. When completing directory names, the directory name is dequoted twice.
  10. This causes problems for directories with single and double quotes in
  11. their names.
  12. Patch (apply with `patch -p0'):
  13. --- a/bashline.c
  14. +++ b/bashline.c
  15. @@ -4167,9 +4167,16 @@ bash_directory_completion_matches (text)
  16. int qc;
  17. qc = rl_dispatching ? rl_completion_quote_character : 0;
  18. - dfn = bash_dequote_filename ((char *)text, qc);
  19. + /* If rl_completion_found_quote != 0, rl_completion_matches will call the
  20. + filename dequoting function, causing the directory name to be dequoted
  21. + twice. */
  22. + if (rl_dispatching && rl_completion_found_quote == 0)
  23. + dfn = bash_dequote_filename ((char *)text, qc);
  24. + else
  25. + dfn = (char *)text;
  26. m1 = rl_completion_matches (dfn, rl_filename_completion_function);
  27. - free (dfn);
  28. + if (dfn != text)
  29. + free (dfn);
  30. if (m1 == 0 || m1[0] == 0)
  31. return m1;
  32. --- a/patchlevel.h
  33. +++ b/patchlevel.h
  34. @@ -25,6 +25,6 @@
  35. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  36. looks for to find the patch level (for the sccs version string). */
  37. -#define PATCHLEVEL 14
  38. +#define PATCHLEVEL 15
  39. #endif /* _PATCHLEVEL_H_ */