[syslinux] CLI prompt function/library

Andrew Bobulsky rulerof at gmail.com
Sun Feb 13 07:33:49 PST 2011


Hello Gene,

Some time ago, there was a post to the gPXE mailing list with a patch
that allowed tab completion... Maybe it was command history... I'm a
little foggy on which.

I could dig it up if you like.

Cheers,
Andrew Bobulsky

On Feb 13, 2011, at 9:10 AM, Gene Cumm <gene.cumm at gmail.com> wrote:

> 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
>
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>




More information about the Syslinux mailing list