= SimpleLineEditor = [[TOC(Projects/Open/LineEditor, depth=2)]] '''Contact:''' Sebastian Huber The [http://www.rtems.com/onlinedocs/doc-current/share/rtems/html/shell/index.html RTEMS Shell and Monitor] both have a simple line editor. They use a very similar implementation. One may refactor this into a common implementation which is usable in a general environment. There are 3 parts: * The key definitions moved to rtems-lineeditor.h * The line editor function, i.e. rtems_shell_line_editor * The terminal parser, i.e. rtems_shell_getchar Some notes: The shell interface and code is better than the monitor. The shell uses FILE handles and this is nice for redirection and multi-user usage (a threaded version). It also supports a command history. The caller should provide the terminal type. This could be a string or a pointer to the terminal data returned to the caller after a call to get the terminal data with a string. It is recommended to review some of the keys actions, for example C-f, to make sure they are considered standard in relation to a normal shell. One should consider cutting out the code that disables echo and obtains the password and putting it in getpass(). See the linux man page. We don't have a controlling /dev/tty so just make it work exactly like it does now. The resulting implementation should work on GNU/Linux and RTEMS. The person undertaking this project should evaluate the provided functionality versus that in GNU readline().