diff options
Diffstat (limited to 'meta/recipes-core/readline/readline/readline82-010.patch')
-rw-r--r-- | meta/recipes-core/readline/readline/readline82-010.patch | 70 |
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 | |||
4 | Readline-Release: 8.2 | ||
5 | Patch-ID: readline82-010 | ||
6 | |||
7 | Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de> | ||
8 | Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de> | ||
9 | Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html | ||
10 | |||
11 | Bug-Description: | ||
12 | |||
13 | Fix the case where text to be completed from the line buffer (quoted) is | ||
14 | compared to the common prefix of the possible matches (unquoted) and the | ||
15 | quoting makes the former appear to be longer than the latter. Readline | ||
16 | assumes the match doesn't add any characters to the word and doesn't display | ||
17 | multiple matches. | ||
18 | |||
19 | Patch (apply with `patch -p0'): | ||
20 | |||
21 | Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] | ||
22 | Signed-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 | ||