1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-01-15 15:41:54 +01:00
slackware-current/source/a/bash/bash-5.2-patches/bash52-037
Patrick J Volkerding f2ee5ebc09 Tue Sep 24 18:42:58 UTC 2024
a/bash-5.2.037-x86_64-1.txz:  Upgraded.
a/dracut-103-x86_64-3.txz:  Rebuilt.
  Don't search for systemd services. Thanks to LuckyCyborg.
d/git-2.46.2-x86_64-1.txz:  Upgraded.
kde/krita-5.2.5-x86_64-1.txz:  Upgraded.
l/gtk4-4.16.2-x86_64-1.txz:  Upgraded.
l/harfbuzz-10.0.0-x86_64-1.txz:  Upgraded.
n/netatalk-3.2.10-x86_64-1.txz:  Upgraded.
xap/mpv-0.39.0-x86_64-1.txz:  Upgraded.
2024-09-24 21:36:52 +02:00

71 lines
2.8 KiB
Text

BASH PATCH REPORT
=================
Bash-Release: 5.2
Patch-ID: bash52-037
Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de>
Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html
Bug-Description:
Fix the case where text to be completed from the line buffer (quoted) is
compared to the common prefix of the possible matches (unquoted) and the
quoting makes the former appear to be longer than the latter. Readline
assumes the match doesn't add any characters to the word and doesn't display
multiple matches.
Patch (apply with `patch -p0'):
*** ../bash-5.2-patched/lib/readline/complete.c Tue Apr 5 10:47:06 2022
--- lib/readline/complete.c Sat Jan 7 14:19:45 2023
***************
*** 2032,2038 ****
text = rl_copy_text (start, end);
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
/* nontrivial_lcd is set if the common prefix adds something to the word
being completed. */
! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0;
if (what_to_do == '!' || what_to_do == '@')
tlen = strlen (text);
--- 2038,2060 ----
text = rl_copy_text (start, end);
matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
+ /* If TEXT contains quote characters, it will be dequoted as part of
+ generating the matches, and the matches will not contain any quote
+ characters. We need to dequote TEXT before performing the comparison.
+ Since compare_match performs the dequoting, and we only want to do it
+ once, we don't call compare_matches after dequoting TEXT; we call
+ strcmp directly. */
/* nontrivial_lcd is set if the common prefix adds something to the word
being completed. */
! if (rl_filename_completion_desired && rl_filename_quoting_desired &&
! rl_completion_found_quote && rl_filename_dequoting_function)
! {
! char *t;
! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
! xfree (text);
! text = t;
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
! }
! else
! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
if (what_to_do == '!' || what_to_do == '@')
tlen = strlen (text);
*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 36
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 37
#endif /* _PATCHLEVEL_H_ */