5 Patch-ID: readline82-009
7 Bug-Reported-by: Stefan H. Holek <stefan@epy.co.at>
8 Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html
13 Fix issue where the directory name portion of the word to be completed (the
14 part that is passed to opendir()) requires both tilde expansion and dequoting.
15 Readline only performed tilde expansion in this case, so filename completion
18 Patch (apply with `patch -p0'):
20 *** ../readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400
21 --- complete.c 2022-10-26 15:08:51.000000000 -0400
32 ! if (*dirname != '~')
33 ! tilde_dirname = 1; /* indicate successful tilde expansion */
38 users_dirname = savestring (dirname);
40 ! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function)
42 ! /* delete single and double quotes */
44 ! dirname = savestring (users_dirname);
46 directory = opendir (dirname);
48 users_dirname = savestring (dirname);
50 ! else if (rl_completion_found_quote && rl_filename_dequoting_function)
52 ! /* We already ran users_dirname through the dequoting function.
53 ! If tilde_dirname == 1, we successfully performed tilde expansion
54 ! on dirname. Now we need to reconcile those results. We either
55 ! just copy the already-dequoted users_dirname or tilde expand it
56 ! if we tilde-expanded dirname. */
57 ! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname);
61 directory = opendir (dirname);
63 *** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
64 --- patchlevel 2014-03-21 08:28:40.000000000 -0400
67 # Do not edit -- exists only for use by patch
71 # Do not edit -- exists only for use by patch