The NuttX NSH is really create, it has a lot of features like autocomplete, history, etc. However a thing missing on it is the ability to edit the typed text after “nsh>”.

After I decided to search for alternatives to replace the NuttX readline or to add text editing support to it.

The first alternative is called editline:

https://github.com/troglobit/editline

It is very complete, but the source code is not so small.

Other alternative is libedit, it is a little smaller than editline:

https://github.com/aosm/libedit

A better alternative to low-end device could could linenoise:

https://github.com/antirez/linenoise

It has many features and it is a single file with 1.7K LoC (lines of code)

Thanks Marco Casaroli for bring linenoise to my attention!