Re: RTEMS | cpukit/shell​​ supports using the tab key to auto-complete commands (!495)

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Jun 10 15:21:44 UTC 2025




Gedare Bloom started a new discussion on cpukit/libmisc/shell/shell.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/495#note_123326

 > +  int max_len = current_common_len;
 > +  
 > +  for (i = start_pos; i < current_common_len && i < strlen(str2); i++) {
 > +    if (str1[i] != str2[i]) {
 > +      max_len = i;
 > +      break;
 > +    }
 > +  }
 > +  
 > +  return max_len;
 > +}
 > +
 > +/* Insert completion content into command line */
 > +static int insert_completion(char *line, int col, int size, FILE *out, 
 > +                            const char *completion, int word_len, int common_len,
 > +                            int matches, int add_suffix, char suffix_char) {

reformat one parameter per line

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/495#note_123326
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250610/84ae8734/attachment.htm>


More information about the bugs mailing list