summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/readline/readline/readline82-010.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/readline/readline/readline82-010.patch')
-rw-r--r--meta/recipes-core/readline/readline/readline82-010.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/readline/readline/readline82-010.patch b/meta/recipes-core/readline/readline/readline82-010.patch
new file mode 100644
index 0000000000..6152953e91
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-010.patch
@@ -0,0 +1,70 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-010
6
7Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de>
8Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html
10
11Bug-Description:
12
13Fix the case where text to be completed from the line buffer (quoted) is
14compared to the common prefix of the possible matches (unquoted) and the
15quoting makes the former appear to be longer than the latter. Readline
16assumes the match doesn't add any characters to the word and doesn't display
17multiple matches.
18
19Patch (apply with `patch -p0'):
20
21Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23
24*** ../readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022
25--- complete.c Sat Jan 7 14:19:45 2023
26***************
27*** 2032,2038 ****
28 text = rl_copy_text (start, end);
29 matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
30 /* nontrivial_lcd is set if the common prefix adds something to the word
31 being completed. */
32! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0;
33 if (what_to_do == '!' || what_to_do == '@')
34 tlen = strlen (text);
35--- 2038,2060 ----
36 text = rl_copy_text (start, end);
37 matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
38+ /* If TEXT contains quote characters, it will be dequoted as part of
39+ generating the matches, and the matches will not contain any quote
40+ characters. We need to dequote TEXT before performing the comparison.
41+ Since compare_match performs the dequoting, and we only want to do it
42+ once, we don't call compare_matches after dequoting TEXT; we call
43+ strcmp directly. */
44 /* nontrivial_lcd is set if the common prefix adds something to the word
45 being completed. */
46! if (rl_filename_completion_desired && rl_filename_quoting_desired &&
47! rl_completion_found_quote && rl_filename_dequoting_function)
48! {
49! char *t;
50! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character);
51! xfree (text);
52! text = t;
53! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
54! }
55! else
56! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
57 if (what_to_do == '!' || what_to_do == '@')
58 tlen = strlen (text);
59
60*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
61--- patchlevel 2014-03-21 08:28:40.000000000 -0400
62***************
63*** 1,3 ****
64 # Do not edit -- exists only for use by patch
65
66! 9
67--- 1,3 ----
68 # Do not edit -- exists only for use by patch
69
70! 10