[syslinux] [PATCH] ui: label completion on tab key

H. Peter Anvin hpa at zytor.com
Sun Jul 20 10:15:57 PDT 2008


Sebastian Herbszt wrote:
> I tired to implement this idea and it seems to work, but i have only tested it
> with syslinux. 
> If you press tab with an empty command line it will display all labels. If the
> command line contains any characters it will display the matching labels.
> 
> This patch is only intended for testing since i didn't check if it doesn't
> clobber required registers. Feedback welcome.

Hi Sebastian,

This sort of works, but there is one piece of messiness: label names are 
still "mangled", which *used* to handle stuff like case conversion, but 
doesn't really anymore.  However, expecially for PXELINUX it is 
problematic, since the host name prefix is actually a binary structure 
in front of the name.

The right thing to do is really to remove this one last link between 
label names and filenames and store the label name unmangled.  This also 
means matching labels *before* mangling the name, i.e. to match from 
command_line instead of KernelName using a comparison which can 
understand end of character (the code that needs replacement is ui.inc, 
lines 311-313), and to just length-check the label name rather than 
mangling it (parseconfig.inc, line 310).

None of this is particularly difficult, of course.

	-hpa




More information about the Syslinux mailing list