patchThe GNU Bourne-Again SHell - Patches: patch #10158, fix...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10158: fix *readline-colored-completion-prefix LS_COLOR extension

Submitter:  Andreas Hrubak <hbandi>
Submitted:  Tue 07 Dec 2021 11:00:40 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Open

Wed 08 Dec 2021 04:40:26 PM UTC, comment #1: 

Thanks for the fix.

Chet Ramey <chet>
Group administrator
Tue 07 Dec 2021 11:00:40 PM UTC, original submission:  

Hi,

please see this quick fix on completion prefix highlighting.
it's based on commit e59452c.

(thanks pointing out the development branch. an extension seems to be really better here because older versions discard the whole LS_COLORS if find an unsupported indicator)


Date:   Tue Dec 7 23:54:15 2021 +0100

    bugfix

diff --git a/lib/readline/colors.c b/lib/readline/colors.c
index 18b640e..050142f 100644
--- a/lib/readline/colors.c
+++ b/lib/readline/colors.c
@@ -108,7 +108,7 @@ _rl_custom_readline_prefix (void)

   len = strlen (RL_COLOR_PREFIX_EXTENSION);
   for (ext = _rl_color_ext_list; ext; ext = ext->next)
-    if (ext->ext.len == len && STREQ (ext->ext.string, RL_COLOR_PREFIX_EXTENSION))
+    if (ext->ext.len == len && STREQN (ext->ext.string, RL_COLOR_PREFIX_EXTENSION, ext->ext.len))
       return (&ext->seq);
   return (NULL);
 }


Andreas Hrubak <hbandi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by hbandi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-08 chet StatusNone Done

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code