[syslinux] CLI prompt function/library

Gene Cumm gene.cumm at gmail.com
Sun Feb 13 06:06:54 PST 2011


I'm looking to get something of a generic CLI prompt function/libarary
into Syslinux for use in a COM32.  I'm looking for the following:

1) Line Editing with proper wrapping.  Currently, gPXE and HDT both
have provisions in place for line editing however they both can not
handle line wrapping appropriately.
2) Tab completion.  Tab completion of filenames would be a goal but
not a priority.  Tab completing on keywords is the priority.  Probably
best as some sort of callback function
3) History.
4) Input.  As a result of all of this, it would probably be best if it
utilized raw input mode (console_ansi_raw()) and get_key().

Here's what I've found so far that doesn't seem appropriate:
editline of libedit: Depends on libncurses which probably means it'll
be large or require adaptation
readline: Probably a good direction but at the moment, far more than I want.
getline: Looks to me like a GNU-specific implementation of fgets()
that can just dynamically realloc() the array if needed.  No editing
here.
HDT: bad line wrapping and HDT-specific call backs however might serve
as a good starting point

At the moment, #1 and #4 are the biggest priorities.  I have the
beginnings of a function for this purpose and I'm trying to figure out
the line wrapping issue that can do overwrite-mode editing.  I think
insert-mode editing will be after I figure out the line wrapping.

If anyone knows of anything that might be a suitable candidate, I'd
love to hear about it.

-- 
-Gene




More information about the Syslinux mailing list