You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Christian Catchpole <ch...@catchpole.net> on 2020/08/16 00:51:31 UTC

Color ANSI support in nsh

Hi everyone,

I have been adding ANSI escape codes for colour support to my app’s console
output and have been experimenting with adding it to nsh itself. At a
minimum to colour the prompt.

I had been thinking this is something i could develop and propose to come
back into the mainline as a nsh kconfig option.

But before i do, the obvious question is, has this been proposed before and
are there reasons we wouldn’t want this in NuttX?

I’m also thinking it would be good to have a single line of command
history. Other configurable options could be clear screen on nsh entry (I
added this as my app was using ANSI line positioning and resets back into
nsh looked messy). There are all sorts of fun things which could be done
with ANSI terminal emulation.

Thanks,
See you all tonight. Where you’ll see my demo going crazy with ANSI colour
codes.

Christian

Re: Color ANSI support in nsh

Posted by Maciej Wójcik <w8...@gmail.com>.
There is a debug menu of NuttX configuration in which you can enable
different levels of logging. You could add an option to differentiate
colours based on debug level. I think this would be both great and doable.

Then if it would be accepted, expose colorful logs to applications somehow.
I wasn't using application level logging recently, just `printf|s. Don't
know how it works now, but it should also be doable.

On Mon, 17 Aug 2020, 13:34 Christian Catchpole, <ch...@catchpole.net>
wrote:

> Thanks everyone.  There's obviously different levels of how far you take
> it. And not just colour, but simple things like "clear screen on NSH
> start", which I found useful for one use case at least.  Having commands
> colour aware as they are in linux is perhaps overkill at this stage. As a
> minimum I found coloring the prompt and then returning to regular print was
> a small but useful trick.
>
> As I'm new to NuttX and returning to serious C/systems development perhaps
> this is something I'll look into as a trial for getting to know Kconfig and
> the NuttX build system.
>
> Perhaps we could have a prompt color option in Kconfig which defaults to
> none.
> And clear screen on start which defaults to no.
>
> CC
>
> On Mon, 17 Aug 2020 at 21:24, Dave Marples <da...@marples.net> wrote:
>
> > Guys, chill, it was a joke :-) of course colour has utility for improved
> > cognition. Back in the day I remember discussions about if colour
> terminals
> > would ever take off cos folks couldn't see the point of them. That
> argument
> > got resolved.
> >
> > Colour certainly has utility. Small size does too. If we can accommodate
> > both (KConfig) then everyone is a winner.
> >
> > Dave
> >
> > On Mon, 17 Aug 2020, 07:50 Maciej Wójcik, <w8...@gmail.com> wrote:
> >
> > > I am confused a bit. Are you all guys talking about the same thing? If
> I
> > > understand correctly Christian just wanted to introduce colors to NSH.
> > >
> > > Colours in the terminal are not about looking good. Colours improve
> > > readability. The same text on the screen carries more information. This
> > is
> > > why everyone is using syntax highlighting in the editor when
> programming.
> > >
> > > It is easier to spot red error and yellow warning than just all black
> > text
> > > in terminal log. It would be great if there would be native option to
> > > enable this, without pdcurses.
> > >
> > >
> > > On Mon, 17 Aug 2020, 08:32 , <di...@gmail.com> wrote:
> > >
> > > > Please do not make technology about looks.... in functionality it has
> > to
> > > > work and be solid and has to address its purposes. If all is finished
> > and
> > > > value is there, one could bring a nice color too it 😉 Color is
> > throwing
> > > > money where functionality died....
> > > >
> > > > Ben
> > > >
> > > > -----Oorspronkelijk bericht-----
> > > > Van: Alan Carvalho de Assis <ac...@gmail.com>
> > > > Verzonden: zondag 16 augustus 2020 17:02
> > > > Aan: dev@nuttx.apache.org
> > > > Onderwerp: Re: Color ANSI support in nsh
> > > >
> > > > Christian,
> > > >
> > > > If I'm not wrong NuttX already has this feature to fancy interface if
> > you
> > > > use of pdcurses library.
> > > >
> > > > Greg added pdcurses some time ago and Ken Petit added support to use
> it
> > > > over telnet
> > > >
> > > > BR,
> > > >
> > > > Alan
> > > >
> > > > On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> > > > > Yeah i should have had a poke around before posting on the group. I
> > > > > keep finding NuttX has so many features in the Kconfig :) I also
> > > > > suggested command history then found my Spresence NSH has history,
> so
> > > > > obviously i was not the first to think of it.
> > > > > I don't want to go TOO crazy with ANSI colours. I'll experiment
> with
> > a
> > > > > few things and then loop back around and see what others think.
> > > > >
> > > > > Thanks,
> > > > > Christian
> > > > >
> > > > >
> > > > > On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net>
> wrote:
> > > > >
> > > > >> Hiya,
> > > > >>
> > > > >> Yes, there's some cheesy simple stuff in there already (mainly to
> > > > >> stop the zephyr folks throwing shade cos their terminal is
> > prettier).
> > > > >> At the moment it only highlights commands, responses and errors
> > iirc,
> > > > >> but making it more context aware would certainly be nice....it's
> > > > >> already switched on/off by kconfig option.
> > > > >>
> > > > >> Regards
> > > > >>
> > > > >> Dave
> > > > >>
> > > > >> On Sun, 16 Aug 2020, 12:24 David Sidrane, <
> David.Sidrane@nscdg.com>
> > > > >> wrote:
> > > > >>
> > > > >> > Hi Christian,
> > > > >> >
> > > > >> > As long as there is a Knob in Kconfig to enable / disable each
> > > > >> > feature (that defaults to disable) the impact is 0.
> > > > >> >
> > > > >> > IIRC there is a history, and some fancy-ness that was added by
> > Dave
> > > > >> > a
> > > > >> while
> > > > >> > ago. Good docs and an example defconfig would will keep it
> > > > >> > maintained
> > > > >> (and
> > > > >> > built). Once we have scripted test running against the sim (or
> > real
> > > > >> > HW) test cases will keep it from breaking.
> > > > >> >
> > > > >> > David
> > > > >> >
> > > > >> > -----Original Message-----
> > > > >> > From: Christian Catchpole [mailto:christian@catchpole.net]
> > > > >> > Sent: Saturday, August 15, 2020 5:52 PM
> > > > >> > To: dev@nuttx.apache.org
> > > > >> > Subject: Color ANSI support in nsh
> > > > >> >
> > > > >> > Hi everyone,
> > > > >> >
> > > > >> > I have been adding ANSI escape codes for colour support to my
> > app’s
> > > > >> console
> > > > >> > output and have been experimenting with adding it to nsh itself.
> > At
> > > > >> > a minimum to colour the prompt.
> > > > >> >
> > > > >> > I had been thinking this is something i could develop and
> propose
> > > > >> > to come back into the mainline as a nsh kconfig option.
> > > > >> >
> > > > >> > But before i do, the obvious question is, has this been proposed
> > > > >> > before
> > > > >> and
> > > > >> > are there reasons we wouldn’t want this in NuttX?
> > > > >> >
> > > > >> > I’m also thinking it would be good to have a single line of
> > command
> > > > >> > history. Other configurable options could be clear screen on nsh
> > > > >> > entry (I added this as my app was using ANSI line positioning
> and
> > > > >> > resets back into nsh looked messy). There are all sorts of fun
> > > > >> > things which could be done with ANSI terminal emulation.
> > > > >> >
> > > > >> > Thanks,
> > > > >> > See you all tonight. Where you’ll see my demo going crazy with
> > ANSI
> > > > >> colour
> > > > >> > codes.
> > > > >> >
> > > > >> > Christian
> > > > >> >
> > > > >>
> > > > >
> > > >
> > > >
> > >
> >
>

Re: Color ANSI support in nsh

Posted by Christian Catchpole <ch...@catchpole.net>.
Thanks everyone.  There's obviously different levels of how far you take
it. And not just colour, but simple things like "clear screen on NSH
start", which I found useful for one use case at least.  Having commands
colour aware as they are in linux is perhaps overkill at this stage. As a
minimum I found coloring the prompt and then returning to regular print was
a small but useful trick.

As I'm new to NuttX and returning to serious C/systems development perhaps
this is something I'll look into as a trial for getting to know Kconfig and
the NuttX build system.

Perhaps we could have a prompt color option in Kconfig which defaults to
none.
And clear screen on start which defaults to no.

CC

On Mon, 17 Aug 2020 at 21:24, Dave Marples <da...@marples.net> wrote:

> Guys, chill, it was a joke :-) of course colour has utility for improved
> cognition. Back in the day I remember discussions about if colour terminals
> would ever take off cos folks couldn't see the point of them. That argument
> got resolved.
>
> Colour certainly has utility. Small size does too. If we can accommodate
> both (KConfig) then everyone is a winner.
>
> Dave
>
> On Mon, 17 Aug 2020, 07:50 Maciej Wójcik, <w8...@gmail.com> wrote:
>
> > I am confused a bit. Are you all guys talking about the same thing? If I
> > understand correctly Christian just wanted to introduce colors to NSH.
> >
> > Colours in the terminal are not about looking good. Colours improve
> > readability. The same text on the screen carries more information. This
> is
> > why everyone is using syntax highlighting in the editor when programming.
> >
> > It is easier to spot red error and yellow warning than just all black
> text
> > in terminal log. It would be great if there would be native option to
> > enable this, without pdcurses.
> >
> >
> > On Mon, 17 Aug 2020, 08:32 , <di...@gmail.com> wrote:
> >
> > > Please do not make technology about looks.... in functionality it has
> to
> > > work and be solid and has to address its purposes. If all is finished
> and
> > > value is there, one could bring a nice color too it 😉 Color is
> throwing
> > > money where functionality died....
> > >
> > > Ben
> > >
> > > -----Oorspronkelijk bericht-----
> > > Van: Alan Carvalho de Assis <ac...@gmail.com>
> > > Verzonden: zondag 16 augustus 2020 17:02
> > > Aan: dev@nuttx.apache.org
> > > Onderwerp: Re: Color ANSI support in nsh
> > >
> > > Christian,
> > >
> > > If I'm not wrong NuttX already has this feature to fancy interface if
> you
> > > use of pdcurses library.
> > >
> > > Greg added pdcurses some time ago and Ken Petit added support to use it
> > > over telnet
> > >
> > > BR,
> > >
> > > Alan
> > >
> > > On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> > > > Yeah i should have had a poke around before posting on the group. I
> > > > keep finding NuttX has so many features in the Kconfig :) I also
> > > > suggested command history then found my Spresence NSH has history, so
> > > > obviously i was not the first to think of it.
> > > > I don't want to go TOO crazy with ANSI colours. I'll experiment with
> a
> > > > few things and then loop back around and see what others think.
> > > >
> > > > Thanks,
> > > > Christian
> > > >
> > > >
> > > > On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
> > > >
> > > >> Hiya,
> > > >>
> > > >> Yes, there's some cheesy simple stuff in there already (mainly to
> > > >> stop the zephyr folks throwing shade cos their terminal is
> prettier).
> > > >> At the moment it only highlights commands, responses and errors
> iirc,
> > > >> but making it more context aware would certainly be nice....it's
> > > >> already switched on/off by kconfig option.
> > > >>
> > > >> Regards
> > > >>
> > > >> Dave
> > > >>
> > > >> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
> > > >> wrote:
> > > >>
> > > >> > Hi Christian,
> > > >> >
> > > >> > As long as there is a Knob in Kconfig to enable / disable each
> > > >> > feature (that defaults to disable) the impact is 0.
> > > >> >
> > > >> > IIRC there is a history, and some fancy-ness that was added by
> Dave
> > > >> > a
> > > >> while
> > > >> > ago. Good docs and an example defconfig would will keep it
> > > >> > maintained
> > > >> (and
> > > >> > built). Once we have scripted test running against the sim (or
> real
> > > >> > HW) test cases will keep it from breaking.
> > > >> >
> > > >> > David
> > > >> >
> > > >> > -----Original Message-----
> > > >> > From: Christian Catchpole [mailto:christian@catchpole.net]
> > > >> > Sent: Saturday, August 15, 2020 5:52 PM
> > > >> > To: dev@nuttx.apache.org
> > > >> > Subject: Color ANSI support in nsh
> > > >> >
> > > >> > Hi everyone,
> > > >> >
> > > >> > I have been adding ANSI escape codes for colour support to my
> app’s
> > > >> console
> > > >> > output and have been experimenting with adding it to nsh itself.
> At
> > > >> > a minimum to colour the prompt.
> > > >> >
> > > >> > I had been thinking this is something i could develop and propose
> > > >> > to come back into the mainline as a nsh kconfig option.
> > > >> >
> > > >> > But before i do, the obvious question is, has this been proposed
> > > >> > before
> > > >> and
> > > >> > are there reasons we wouldn’t want this in NuttX?
> > > >> >
> > > >> > I’m also thinking it would be good to have a single line of
> command
> > > >> > history. Other configurable options could be clear screen on nsh
> > > >> > entry (I added this as my app was using ANSI line positioning and
> > > >> > resets back into nsh looked messy). There are all sorts of fun
> > > >> > things which could be done with ANSI terminal emulation.
> > > >> >
> > > >> > Thanks,
> > > >> > See you all tonight. Where you’ll see my demo going crazy with
> ANSI
> > > >> colour
> > > >> > codes.
> > > >> >
> > > >> > Christian
> > > >> >
> > > >>
> > > >
> > >
> > >
> >
>

Re: Color ANSI support in nsh

Posted by Dave Marples <da...@marples.net>.
Guys, chill, it was a joke :-) of course colour has utility for improved
cognition. Back in the day I remember discussions about if colour terminals
would ever take off cos folks couldn't see the point of them. That argument
got resolved.

Colour certainly has utility. Small size does too. If we can accommodate
both (KConfig) then everyone is a winner.

Dave

On Mon, 17 Aug 2020, 07:50 Maciej Wójcik, <w8...@gmail.com> wrote:

> I am confused a bit. Are you all guys talking about the same thing? If I
> understand correctly Christian just wanted to introduce colors to NSH.
>
> Colours in the terminal are not about looking good. Colours improve
> readability. The same text on the screen carries more information. This is
> why everyone is using syntax highlighting in the editor when programming.
>
> It is easier to spot red error and yellow warning than just all black text
> in terminal log. It would be great if there would be native option to
> enable this, without pdcurses.
>
>
> On Mon, 17 Aug 2020, 08:32 , <di...@gmail.com> wrote:
>
> > Please do not make technology about looks.... in functionality it has to
> > work and be solid and has to address its purposes. If all is finished and
> > value is there, one could bring a nice color too it 😉 Color is throwing
> > money where functionality died....
> >
> > Ben
> >
> > -----Oorspronkelijk bericht-----
> > Van: Alan Carvalho de Assis <ac...@gmail.com>
> > Verzonden: zondag 16 augustus 2020 17:02
> > Aan: dev@nuttx.apache.org
> > Onderwerp: Re: Color ANSI support in nsh
> >
> > Christian,
> >
> > If I'm not wrong NuttX already has this feature to fancy interface if you
> > use of pdcurses library.
> >
> > Greg added pdcurses some time ago and Ken Petit added support to use it
> > over telnet
> >
> > BR,
> >
> > Alan
> >
> > On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> > > Yeah i should have had a poke around before posting on the group. I
> > > keep finding NuttX has so many features in the Kconfig :) I also
> > > suggested command history then found my Spresence NSH has history, so
> > > obviously i was not the first to think of it.
> > > I don't want to go TOO crazy with ANSI colours. I'll experiment with a
> > > few things and then loop back around and see what others think.
> > >
> > > Thanks,
> > > Christian
> > >
> > >
> > > On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
> > >
> > >> Hiya,
> > >>
> > >> Yes, there's some cheesy simple stuff in there already (mainly to
> > >> stop the zephyr folks throwing shade cos their terminal is prettier).
> > >> At the moment it only highlights commands, responses and errors iirc,
> > >> but making it more context aware would certainly be nice....it's
> > >> already switched on/off by kconfig option.
> > >>
> > >> Regards
> > >>
> > >> Dave
> > >>
> > >> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
> > >> wrote:
> > >>
> > >> > Hi Christian,
> > >> >
> > >> > As long as there is a Knob in Kconfig to enable / disable each
> > >> > feature (that defaults to disable) the impact is 0.
> > >> >
> > >> > IIRC there is a history, and some fancy-ness that was added by Dave
> > >> > a
> > >> while
> > >> > ago. Good docs and an example defconfig would will keep it
> > >> > maintained
> > >> (and
> > >> > built). Once we have scripted test running against the sim (or real
> > >> > HW) test cases will keep it from breaking.
> > >> >
> > >> > David
> > >> >
> > >> > -----Original Message-----
> > >> > From: Christian Catchpole [mailto:christian@catchpole.net]
> > >> > Sent: Saturday, August 15, 2020 5:52 PM
> > >> > To: dev@nuttx.apache.org
> > >> > Subject: Color ANSI support in nsh
> > >> >
> > >> > Hi everyone,
> > >> >
> > >> > I have been adding ANSI escape codes for colour support to my app’s
> > >> console
> > >> > output and have been experimenting with adding it to nsh itself. At
> > >> > a minimum to colour the prompt.
> > >> >
> > >> > I had been thinking this is something i could develop and propose
> > >> > to come back into the mainline as a nsh kconfig option.
> > >> >
> > >> > But before i do, the obvious question is, has this been proposed
> > >> > before
> > >> and
> > >> > are there reasons we wouldn’t want this in NuttX?
> > >> >
> > >> > I’m also thinking it would be good to have a single line of command
> > >> > history. Other configurable options could be clear screen on nsh
> > >> > entry (I added this as my app was using ANSI line positioning and
> > >> > resets back into nsh looked messy). There are all sorts of fun
> > >> > things which could be done with ANSI terminal emulation.
> > >> >
> > >> > Thanks,
> > >> > See you all tonight. Where you’ll see my demo going crazy with ANSI
> > >> colour
> > >> > codes.
> > >> >
> > >> > Christian
> > >> >
> > >>
> > >
> >
> >
>

Re: Color ANSI support in nsh

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
I liked it to!

Should be nice to have some "text bar" widgets too, like we have in
the alsamixer ;-)

BR,

Alan

On 8/17/20, Matias N. <ma...@imap.cc> wrote:
> I really liked your telemetry app with colored output you shown on the
> video.
>
> On Mon, Aug 17, 2020, at 20:47, Christian Catchpole wrote:
>> something to consider with querying the terminal for capabilities /
>> terminal size etc, is where there is no terminal actually connected at
>> the
>> time.  this would cause it to hang or require timeouts or other
>> complications. but i guess querying might only occur after user input.
>> Again, as long as its all optional, people can apply what they like.
>>
>> this is something i really love about NuttX. nice and lean baseline but
>> so
>> much discoverable behind kconfig options.
>>
>> again, i'll put together a basic proposal for ANSI support in NSH and see
>> what people think of the implementation.
>>
>>
>> On Tue, 18 Aug 2020 at 05:06, Gregory Nutt <sp...@gmail.com> wrote:
>>
>> > A basic terminfo/termcaps  could be very trivial
>> >
>> > > A more general solution would be handy but what is there really in
>> > > the
>> > > embedded world that doesn't support vt100? There more code there is,
>> > > the
>> > > more interesting ways it can go wrong :-)
>> >
>> > I have sometimes used cat /dev/ttyS0 on the host as a terminal.
>> >
>> > I seen some simple Linux terminals that do not support VT-100.
>> >
>> > The NuttX cu terminal does not support VT-100 commands.
>> >
>> > There are several.
>> >
>> >
>> >
>>
>

Re: Color ANSI support in nsh

Posted by Christian Catchpole <ch...@catchpole.net>.
Thanks Matias!

I've dropped the code into a gist if anyone is interested in using it.
It's c++ but of course wouldn't take much to turn in a C with structs. and
of course modify it in other ways to your own needs.

You simply call one of these methods..

void log(const char * source, const char * instance, const char * action,
char * detail);
void log(const char * source, const char * instance, const char * action,
char * detail, int value);

the second is simply a convenience to print a message with an integer.
source, instance and action should be constant / non moving. if they do
move the pointer compare (not string compare) will simply miss and it will
go to a new line.  if it runs out of lines it simply replaces the last
time. total lines is defined by a constant as this affects the amount of
memory it's going to consume.

https://gist.github.com/slipperyseal/2903dea1c34b21476dab4e2aab963467

CC


On Tue, 18 Aug 2020 at 09:50, Matias N. <ma...@imap.cc> wrote:

> I really liked your telemetry app with colored output you shown on the
> video.
>
> On Mon, Aug 17, 2020, at 20:47, Christian Catchpole wrote:
> > something to consider with querying the terminal for capabilities /
> > terminal size etc, is where there is no terminal actually connected at
> the
> > time.  this would cause it to hang or require timeouts or other
> > complications. but i guess querying might only occur after user input.
> > Again, as long as its all optional, people can apply what they like.
> >
> > this is something i really love about NuttX. nice and lean baseline but
> so
> > much discoverable behind kconfig options.
> >
> > again, i'll put together a basic proposal for ANSI support in NSH and see
> > what people think of the implementation.
> >
> >
> > On Tue, 18 Aug 2020 at 05:06, Gregory Nutt <sp...@gmail.com> wrote:
> >
> > > A basic terminfo/termcaps  could be very trivial
> > >
> > > > A more general solution would be handy but what is there really in
> the
> > > > embedded world that doesn't support vt100? There more code there is,
> the
> > > > more interesting ways it can go wrong :-)
> > >
> > > I have sometimes used cat /dev/ttyS0 on the host as a terminal.
> > >
> > > I seen some simple Linux terminals that do not support VT-100.
> > >
> > > The NuttX cu terminal does not support VT-100 commands.
> > >
> > > There are several.
> > >
> > >
> > >
> >
>

Re: Color ANSI support in nsh

Posted by "Matias N." <ma...@imap.cc>.
I really liked your telemetry app with colored output you shown on the video.

On Mon, Aug 17, 2020, at 20:47, Christian Catchpole wrote:
> something to consider with querying the terminal for capabilities /
> terminal size etc, is where there is no terminal actually connected at the
> time.  this would cause it to hang or require timeouts or other
> complications. but i guess querying might only occur after user input.
> Again, as long as its all optional, people can apply what they like.
> 
> this is something i really love about NuttX. nice and lean baseline but so
> much discoverable behind kconfig options.
> 
> again, i'll put together a basic proposal for ANSI support in NSH and see
> what people think of the implementation.
> 
> 
> On Tue, 18 Aug 2020 at 05:06, Gregory Nutt <sp...@gmail.com> wrote:
> 
> > A basic terminfo/termcaps  could be very trivial
> >
> > > A more general solution would be handy but what is there really in the
> > > embedded world that doesn't support vt100? There more code there is, the
> > > more interesting ways it can go wrong :-)
> >
> > I have sometimes used cat /dev/ttyS0 on the host as a terminal.
> >
> > I seen some simple Linux terminals that do not support VT-100.
> >
> > The NuttX cu terminal does not support VT-100 commands.
> >
> > There are several.
> >
> >
> >
> 

Re: Color ANSI support in nsh

Posted by Christian Catchpole <ch...@catchpole.net>.
something to consider with querying the terminal for capabilities /
terminal size etc, is where there is no terminal actually connected at the
time.  this would cause it to hang or require timeouts or other
complications. but i guess querying might only occur after user input.
Again, as long as its all optional, people can apply what they like.

this is something i really love about NuttX. nice and lean baseline but so
much discoverable behind kconfig options.

again, i'll put together a basic proposal for ANSI support in NSH and see
what people think of the implementation.


On Tue, 18 Aug 2020 at 05:06, Gregory Nutt <sp...@gmail.com> wrote:

> A basic terminfo/termcaps  could be very trivial
>
> > A more general solution would be handy but what is there really in the
> > embedded world that doesn't support vt100? There more code there is, the
> > more interesting ways it can go wrong :-)
>
> I have sometimes used cat /dev/ttyS0 on the host as a terminal.
>
> I seen some simple Linux terminals that do not support VT-100.
>
> The NuttX cu terminal does not support VT-100 commands.
>
> There are several.
>
>
>

Re: Color ANSI support in nsh

Posted by Gregory Nutt <sp...@gmail.com>.
A basic terminfo/termcaps  could be very trivial

> A more general solution would be handy but what is there really in the
> embedded world that doesn't support vt100? There more code there is, the
> more interesting ways it can go wrong :-)

I have sometimes used cat /dev/ttyS0 on the host as a terminal.

I seen some simple Linux terminals that do not support VT-100.

The NuttX cu terminal does not support VT-100 commands.

There are several.



Re: Color ANSI support in nsh

Posted by Dave Marples <da...@marples.net>.
A more general solution would be handy but what is there really in the
embedded world that doesn't support vt100? There more code there is, the
more interesting ways it can go wrong :-)

(BTW; ctrl-L to clear the screen was one of the first things I added after
fixing backspace/delete....both of those drove me crazy).

Regards

Dave

On Mon, 17 Aug 2020, 15:51 Gregory Nutt, <sp...@gmail.com> wrote:

>
> > I would suggest that you look at how this is handled in standard
> terminals. This works in the form
> > of escape sequence which give a code that the terminal can interpret as
> being a color. This would
> > make it available to applications in a standard form.
>
> Good point.  The GNU part of GNU/Linux devotes a lot of logic into
> managing terminals. Eg.
>
> https://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html
> and https://linux.die.net/man/5/terminfo and
> https://pubs.opengroup.org/onlinepubs/007908799/xcurses/terminfo.html
> and etc...
>
> NuttX generally just hard codes VT-100 terminal types (or the
> almost-dentical ANSII terminal type).  But there are lots of others.
> Perhaps we should really be considering how we handle terminals in
> general not just color on or off?  That is really what the current
> discussion is about, terminal capabilities (termcaps) and
> customizations.  Maybe, as a start, we should consider a
> terminfo/termaps for monochrome vs. color only.  That would be a step in
> the Unix direction version yet-another-ad-hoc-config-setting.
>
>
>
>

Re: Color ANSI support in nsh

Posted by Gregory Nutt <sp...@gmail.com>.
> I would suggest that you look at how this is handled in standard terminals. This works in the form
> of escape sequence which give a code that the terminal can interpret as being a color. This would
> make it available to applications in a standard form.

Good point.  The GNU part of GNU/Linux devotes a lot of logic into 
managing terminals. Eg. 
https://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html 
and https://linux.die.net/man/5/terminfo and 
https://pubs.opengroup.org/onlinepubs/007908799/xcurses/terminfo.html 
and etc...

NuttX generally just hard codes VT-100 terminal types (or the 
almost-dentical ANSII terminal type).  But there are lots of others.  
Perhaps we should really be considering how we handle terminals in 
general not just color on or off?  That is really what the current 
discussion is about, terminal capabilities (termcaps) and 
customizations.  Maybe, as a start, we should consider a 
terminfo/termaps for monochrome vs. color only.  That would be a step in 
the Unix direction version yet-another-ad-hoc-config-setting.




Re: Color ANSI support in nsh

Posted by "Matias N." <ma...@imap.cc>.
Having the ability to display color on the console is really useful to provide easy
to read output in many scenarios (e.g. test with OK/ERROR). 

But I agree it should be disabled by default and not overly complicate things.

I would suggest that you look at how this is handled in standard terminals. This works in the form
of escape sequence which give a code that the terminal can interpret as being a color. This would
make it available to applications in a standard form. 

As per coloring the prompt, bash uses special environment variables that allow you to redefine the
prompt and this way you can insert those escape sequences to color it.

Best,
Matias

Re: Color ANSI support in nsh

Posted by Gregory Nutt <sp...@gmail.com>.
> This is my suggestion, it should be enabled by default, but disabled
> by default if CONFIG_DEFAULT_SMALL is selected.
>
> What do you think?
I would prefer to see it just disabled by default.

Re: Color ANSI support in nsh

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Maciej,

I completely agree with it, I was only saying there is an alternative.

I also want native support to have Color support in the terminal.

This is my suggestion, it should be enabled by default, but disabled
by default if CONFIG_DEFAULT_SMALL is selected.

What do you think?

BR,

Alan

On 8/17/20, Maciej Wójcik <w8...@gmail.com> wrote:
> I am confused a bit. Are you all guys talking about the same thing? If I
> understand correctly Christian just wanted to introduce colors to NSH.
>
> Colours in the terminal are not about looking good. Colours improve
> readability. The same text on the screen carries more information. This is
> why everyone is using syntax highlighting in the editor when programming.
>
> It is easier to spot red error and yellow warning than just all black text
> in terminal log. It would be great if there would be native option to
> enable this, without pdcurses.
>
>
> On Mon, 17 Aug 2020, 08:32 , <di...@gmail.com> wrote:
>
>> Please do not make technology about looks.... in functionality it has to
>> work and be solid and has to address its purposes. If all is finished and
>> value is there, one could bring a nice color too it 😉 Color is throwing
>> money where functionality died....
>>
>> Ben
>>
>> -----Oorspronkelijk bericht-----
>> Van: Alan Carvalho de Assis <ac...@gmail.com>
>> Verzonden: zondag 16 augustus 2020 17:02
>> Aan: dev@nuttx.apache.org
>> Onderwerp: Re: Color ANSI support in nsh
>>
>> Christian,
>>
>> If I'm not wrong NuttX already has this feature to fancy interface if you
>> use of pdcurses library.
>>
>> Greg added pdcurses some time ago and Ken Petit added support to use it
>> over telnet
>>
>> BR,
>>
>> Alan
>>
>> On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
>> > Yeah i should have had a poke around before posting on the group. I
>> > keep finding NuttX has so many features in the Kconfig :) I also
>> > suggested command history then found my Spresence NSH has history, so
>> > obviously i was not the first to think of it.
>> > I don't want to go TOO crazy with ANSI colours. I'll experiment with a
>> > few things and then loop back around and see what others think.
>> >
>> > Thanks,
>> > Christian
>> >
>> >
>> > On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
>> >
>> >> Hiya,
>> >>
>> >> Yes, there's some cheesy simple stuff in there already (mainly to
>> >> stop the zephyr folks throwing shade cos their terminal is prettier).
>> >> At the moment it only highlights commands, responses and errors iirc,
>> >> but making it more context aware would certainly be nice....it's
>> >> already switched on/off by kconfig option.
>> >>
>> >> Regards
>> >>
>> >> Dave
>> >>
>> >> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
>> >> wrote:
>> >>
>> >> > Hi Christian,
>> >> >
>> >> > As long as there is a Knob in Kconfig to enable / disable each
>> >> > feature (that defaults to disable) the impact is 0.
>> >> >
>> >> > IIRC there is a history, and some fancy-ness that was added by Dave
>> >> > a
>> >> while
>> >> > ago. Good docs and an example defconfig would will keep it
>> >> > maintained
>> >> (and
>> >> > built). Once we have scripted test running against the sim (or real
>> >> > HW) test cases will keep it from breaking.
>> >> >
>> >> > David
>> >> >
>> >> > -----Original Message-----
>> >> > From: Christian Catchpole [mailto:christian@catchpole.net]
>> >> > Sent: Saturday, August 15, 2020 5:52 PM
>> >> > To: dev@nuttx.apache.org
>> >> > Subject: Color ANSI support in nsh
>> >> >
>> >> > Hi everyone,
>> >> >
>> >> > I have been adding ANSI escape codes for colour support to my app’s
>> >> console
>> >> > output and have been experimenting with adding it to nsh itself. At
>> >> > a minimum to colour the prompt.
>> >> >
>> >> > I had been thinking this is something i could develop and propose
>> >> > to come back into the mainline as a nsh kconfig option.
>> >> >
>> >> > But before i do, the obvious question is, has this been proposed
>> >> > before
>> >> and
>> >> > are there reasons we wouldn’t want this in NuttX?
>> >> >
>> >> > I’m also thinking it would be good to have a single line of command
>> >> > history. Other configurable options could be clear screen on nsh
>> >> > entry (I added this as my app was using ANSI line positioning and
>> >> > resets back into nsh looked messy). There are all sorts of fun
>> >> > things which could be done with ANSI terminal emulation.
>> >> >
>> >> > Thanks,
>> >> > See you all tonight. Where you’ll see my demo going crazy with ANSI
>> >> colour
>> >> > codes.
>> >> >
>> >> > Christian
>> >> >
>> >>
>> >
>>
>>
>

Re: Color ANSI support in nsh

Posted by Maciej Wójcik <w8...@gmail.com>.
I am confused a bit. Are you all guys talking about the same thing? If I
understand correctly Christian just wanted to introduce colors to NSH.

Colours in the terminal are not about looking good. Colours improve
readability. The same text on the screen carries more information. This is
why everyone is using syntax highlighting in the editor when programming.

It is easier to spot red error and yellow warning than just all black text
in terminal log. It would be great if there would be native option to
enable this, without pdcurses.


On Mon, 17 Aug 2020, 08:32 , <di...@gmail.com> wrote:

> Please do not make technology about looks.... in functionality it has to
> work and be solid and has to address its purposes. If all is finished and
> value is there, one could bring a nice color too it 😉 Color is throwing
> money where functionality died....
>
> Ben
>
> -----Oorspronkelijk bericht-----
> Van: Alan Carvalho de Assis <ac...@gmail.com>
> Verzonden: zondag 16 augustus 2020 17:02
> Aan: dev@nuttx.apache.org
> Onderwerp: Re: Color ANSI support in nsh
>
> Christian,
>
> If I'm not wrong NuttX already has this feature to fancy interface if you
> use of pdcurses library.
>
> Greg added pdcurses some time ago and Ken Petit added support to use it
> over telnet
>
> BR,
>
> Alan
>
> On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> > Yeah i should have had a poke around before posting on the group. I
> > keep finding NuttX has so many features in the Kconfig :) I also
> > suggested command history then found my Spresence NSH has history, so
> > obviously i was not the first to think of it.
> > I don't want to go TOO crazy with ANSI colours. I'll experiment with a
> > few things and then loop back around and see what others think.
> >
> > Thanks,
> > Christian
> >
> >
> > On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
> >
> >> Hiya,
> >>
> >> Yes, there's some cheesy simple stuff in there already (mainly to
> >> stop the zephyr folks throwing shade cos their terminal is prettier).
> >> At the moment it only highlights commands, responses and errors iirc,
> >> but making it more context aware would certainly be nice....it's
> >> already switched on/off by kconfig option.
> >>
> >> Regards
> >>
> >> Dave
> >>
> >> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
> >> wrote:
> >>
> >> > Hi Christian,
> >> >
> >> > As long as there is a Knob in Kconfig to enable / disable each
> >> > feature (that defaults to disable) the impact is 0.
> >> >
> >> > IIRC there is a history, and some fancy-ness that was added by Dave
> >> > a
> >> while
> >> > ago. Good docs and an example defconfig would will keep it
> >> > maintained
> >> (and
> >> > built). Once we have scripted test running against the sim (or real
> >> > HW) test cases will keep it from breaking.
> >> >
> >> > David
> >> >
> >> > -----Original Message-----
> >> > From: Christian Catchpole [mailto:christian@catchpole.net]
> >> > Sent: Saturday, August 15, 2020 5:52 PM
> >> > To: dev@nuttx.apache.org
> >> > Subject: Color ANSI support in nsh
> >> >
> >> > Hi everyone,
> >> >
> >> > I have been adding ANSI escape codes for colour support to my app’s
> >> console
> >> > output and have been experimenting with adding it to nsh itself. At
> >> > a minimum to colour the prompt.
> >> >
> >> > I had been thinking this is something i could develop and propose
> >> > to come back into the mainline as a nsh kconfig option.
> >> >
> >> > But before i do, the obvious question is, has this been proposed
> >> > before
> >> and
> >> > are there reasons we wouldn’t want this in NuttX?
> >> >
> >> > I’m also thinking it would be good to have a single line of command
> >> > history. Other configurable options could be clear screen on nsh
> >> > entry (I added this as my app was using ANSI line positioning and
> >> > resets back into nsh looked messy). There are all sorts of fun
> >> > things which could be done with ANSI terminal emulation.
> >> >
> >> > Thanks,
> >> > See you all tonight. Where you’ll see my demo going crazy with ANSI
> >> colour
> >> > codes.
> >> >
> >> > Christian
> >> >
> >>
> >
>
>

RE: Color ANSI support in nsh

Posted by di...@gmail.com.
Please do not make technology about looks.... in functionality it has to work and be solid and has to address its purposes. If all is finished and value is there, one could bring a nice color too it 😉 Color is throwing money where functionality died....

Ben

-----Oorspronkelijk bericht-----
Van: Alan Carvalho de Assis <ac...@gmail.com> 
Verzonden: zondag 16 augustus 2020 17:02
Aan: dev@nuttx.apache.org
Onderwerp: Re: Color ANSI support in nsh

Christian,

If I'm not wrong NuttX already has this feature to fancy interface if you use of pdcurses library.

Greg added pdcurses some time ago and Ken Petit added support to use it over telnet

BR,

Alan

On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> Yeah i should have had a poke around before posting on the group. I 
> keep finding NuttX has so many features in the Kconfig :) I also 
> suggested command history then found my Spresence NSH has history, so 
> obviously i was not the first to think of it.
> I don't want to go TOO crazy with ANSI colours. I'll experiment with a 
> few things and then loop back around and see what others think.
>
> Thanks,
> Christian
>
>
> On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
>
>> Hiya,
>>
>> Yes, there's some cheesy simple stuff in there already (mainly to 
>> stop the zephyr folks throwing shade cos their terminal is prettier). 
>> At the moment it only highlights commands, responses and errors iirc, 
>> but making it more context aware would certainly be nice....it's 
>> already switched on/off by kconfig option.
>>
>> Regards
>>
>> Dave
>>
>> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
>> wrote:
>>
>> > Hi Christian,
>> >
>> > As long as there is a Knob in Kconfig to enable / disable each 
>> > feature (that defaults to disable) the impact is 0.
>> >
>> > IIRC there is a history, and some fancy-ness that was added by Dave 
>> > a
>> while
>> > ago. Good docs and an example defconfig would will keep it 
>> > maintained
>> (and
>> > built). Once we have scripted test running against the sim (or real 
>> > HW) test cases will keep it from breaking.
>> >
>> > David
>> >
>> > -----Original Message-----
>> > From: Christian Catchpole [mailto:christian@catchpole.net]
>> > Sent: Saturday, August 15, 2020 5:52 PM
>> > To: dev@nuttx.apache.org
>> > Subject: Color ANSI support in nsh
>> >
>> > Hi everyone,
>> >
>> > I have been adding ANSI escape codes for colour support to my app’s
>> console
>> > output and have been experimenting with adding it to nsh itself. At 
>> > a minimum to colour the prompt.
>> >
>> > I had been thinking this is something i could develop and propose 
>> > to come back into the mainline as a nsh kconfig option.
>> >
>> > But before i do, the obvious question is, has this been proposed 
>> > before
>> and
>> > are there reasons we wouldn’t want this in NuttX?
>> >
>> > I’m also thinking it would be good to have a single line of command 
>> > history. Other configurable options could be clear screen on nsh 
>> > entry (I added this as my app was using ANSI line positioning and 
>> > resets back into nsh looked messy). There are all sorts of fun 
>> > things which could be done with ANSI terminal emulation.
>> >
>> > Thanks,
>> > See you all tonight. Where you’ll see my demo going crazy with ANSI
>> colour
>> > codes.
>> >
>> > Christian
>> >
>>
>


Re: Color ANSI support in nsh

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Christian,

If I'm not wrong NuttX already has this feature to fancy interface if
you use of pdcurses library.

Greg added pdcurses some time ago and Ken Petit added support to use
it over telnet

BR,

Alan

On 8/16/20, Christian Catchpole <ch...@catchpole.net> wrote:
> Yeah i should have had a poke around before posting on the group. I keep
> finding NuttX has so many features in the Kconfig :)
> I also suggested command history then found my Spresence NSH has history,
> so obviously i was not the first to think of it.
> I don't want to go TOO crazy with ANSI colours. I'll experiment with a few
> things and then loop back around and see what others think.
>
> Thanks,
> Christian
>
>
> On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:
>
>> Hiya,
>>
>> Yes, there's some cheesy simple stuff in there already (mainly to stop
>> the
>> zephyr folks throwing shade cos their terminal is prettier). At the
>> moment
>> it only highlights commands, responses and errors iirc, but making it
>> more
>> context aware would certainly be nice....it's already switched on/off by
>> kconfig option.
>>
>> Regards
>>
>> Dave
>>
>> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com>
>> wrote:
>>
>> > Hi Christian,
>> >
>> > As long as there is a Knob in Kconfig to enable / disable each feature
>> > (that
>> > defaults to disable) the impact is 0.
>> >
>> > IIRC there is a history, and some fancy-ness that was added by Dave a
>> while
>> > ago. Good docs and an example defconfig would will keep it maintained
>> (and
>> > built). Once we have scripted test running against the sim (or real HW)
>> > test
>> > cases will keep it from breaking.
>> >
>> > David
>> >
>> > -----Original Message-----
>> > From: Christian Catchpole [mailto:christian@catchpole.net]
>> > Sent: Saturday, August 15, 2020 5:52 PM
>> > To: dev@nuttx.apache.org
>> > Subject: Color ANSI support in nsh
>> >
>> > Hi everyone,
>> >
>> > I have been adding ANSI escape codes for colour support to my app’s
>> console
>> > output and have been experimenting with adding it to nsh itself. At a
>> > minimum to colour the prompt.
>> >
>> > I had been thinking this is something i could develop and propose to
>> > come
>> > back into the mainline as a nsh kconfig option.
>> >
>> > But before i do, the obvious question is, has this been proposed before
>> and
>> > are there reasons we wouldn’t want this in NuttX?
>> >
>> > I’m also thinking it would be good to have a single line of command
>> > history. Other configurable options could be clear screen on nsh entry
>> > (I
>> > added this as my app was using ANSI line positioning and resets back
>> > into
>> > nsh looked messy). There are all sorts of fun things which could be
>> > done
>> > with ANSI terminal emulation.
>> >
>> > Thanks,
>> > See you all tonight. Where you’ll see my demo going crazy with ANSI
>> colour
>> > codes.
>> >
>> > Christian
>> >
>>
>

Re: Color ANSI support in nsh

Posted by Christian Catchpole <ch...@catchpole.net>.
Yeah i should have had a poke around before posting on the group. I keep
finding NuttX has so many features in the Kconfig :)
I also suggested command history then found my Spresence NSH has history,
so obviously i was not the first to think of it.
I don't want to go TOO crazy with ANSI colours. I'll experiment with a few
things and then loop back around and see what others think.

Thanks,
Christian


On Sun, 16 Aug 2020 at 22:11, Dave Marples <da...@marples.net> wrote:

> Hiya,
>
> Yes, there's some cheesy simple stuff in there already (mainly to stop the
> zephyr folks throwing shade cos their terminal is prettier). At the moment
> it only highlights commands, responses and errors iirc, but making it more
> context aware would certainly be nice....it's already switched on/off by
> kconfig option.
>
> Regards
>
> Dave
>
> On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com> wrote:
>
> > Hi Christian,
> >
> > As long as there is a Knob in Kconfig to enable / disable each feature
> > (that
> > defaults to disable) the impact is 0.
> >
> > IIRC there is a history, and some fancy-ness that was added by Dave a
> while
> > ago. Good docs and an example defconfig would will keep it maintained
> (and
> > built). Once we have scripted test running against the sim (or real HW)
> > test
> > cases will keep it from breaking.
> >
> > David
> >
> > -----Original Message-----
> > From: Christian Catchpole [mailto:christian@catchpole.net]
> > Sent: Saturday, August 15, 2020 5:52 PM
> > To: dev@nuttx.apache.org
> > Subject: Color ANSI support in nsh
> >
> > Hi everyone,
> >
> > I have been adding ANSI escape codes for colour support to my app’s
> console
> > output and have been experimenting with adding it to nsh itself. At a
> > minimum to colour the prompt.
> >
> > I had been thinking this is something i could develop and propose to come
> > back into the mainline as a nsh kconfig option.
> >
> > But before i do, the obvious question is, has this been proposed before
> and
> > are there reasons we wouldn’t want this in NuttX?
> >
> > I’m also thinking it would be good to have a single line of command
> > history. Other configurable options could be clear screen on nsh entry (I
> > added this as my app was using ANSI line positioning and resets back into
> > nsh looked messy). There are all sorts of fun things which could be done
> > with ANSI terminal emulation.
> >
> > Thanks,
> > See you all tonight. Where you’ll see my demo going crazy with ANSI
> colour
> > codes.
> >
> > Christian
> >
>

Re: Color ANSI support in nsh

Posted by Dave Marples <da...@marples.net>.
Hiya,

Yes, there's some cheesy simple stuff in there already (mainly to stop the
zephyr folks throwing shade cos their terminal is prettier). At the moment
it only highlights commands, responses and errors iirc, but making it more
context aware would certainly be nice....it's already switched on/off by
kconfig option.

Regards

Dave

On Sun, 16 Aug 2020, 12:24 David Sidrane, <Da...@nscdg.com> wrote:

> Hi Christian,
>
> As long as there is a Knob in Kconfig to enable / disable each feature
> (that
> defaults to disable) the impact is 0.
>
> IIRC there is a history, and some fancy-ness that was added by Dave a while
> ago. Good docs and an example defconfig would will keep it maintained (and
> built). Once we have scripted test running against the sim (or real HW)
> test
> cases will keep it from breaking.
>
> David
>
> -----Original Message-----
> From: Christian Catchpole [mailto:christian@catchpole.net]
> Sent: Saturday, August 15, 2020 5:52 PM
> To: dev@nuttx.apache.org
> Subject: Color ANSI support in nsh
>
> Hi everyone,
>
> I have been adding ANSI escape codes for colour support to my app’s console
> output and have been experimenting with adding it to nsh itself. At a
> minimum to colour the prompt.
>
> I had been thinking this is something i could develop and propose to come
> back into the mainline as a nsh kconfig option.
>
> But before i do, the obvious question is, has this been proposed before and
> are there reasons we wouldn’t want this in NuttX?
>
> I’m also thinking it would be good to have a single line of command
> history. Other configurable options could be clear screen on nsh entry (I
> added this as my app was using ANSI line positioning and resets back into
> nsh looked messy). There are all sorts of fun things which could be done
> with ANSI terminal emulation.
>
> Thanks,
> See you all tonight. Where you’ll see my demo going crazy with ANSI colour
> codes.
>
> Christian
>

RE: Color ANSI support in nsh

Posted by David Sidrane <Da...@nscdg.com>.
Hi Christian,

As long as there is a Knob in Kconfig to enable / disable each feature (that
defaults to disable) the impact is 0.

IIRC there is a history, and some fancy-ness that was added by Dave a while
ago. Good docs and an example defconfig would will keep it maintained (and
built). Once we have scripted test running against the sim (or real HW) test
cases will keep it from breaking.

David

-----Original Message-----
From: Christian Catchpole [mailto:christian@catchpole.net]
Sent: Saturday, August 15, 2020 5:52 PM
To: dev@nuttx.apache.org
Subject: Color ANSI support in nsh

Hi everyone,

I have been adding ANSI escape codes for colour support to my app’s console
output and have been experimenting with adding it to nsh itself. At a
minimum to colour the prompt.

I had been thinking this is something i could develop and propose to come
back into the mainline as a nsh kconfig option.

But before i do, the obvious question is, has this been proposed before and
are there reasons we wouldn’t want this in NuttX?

I’m also thinking it would be good to have a single line of command
history. Other configurable options could be clear screen on nsh entry (I
added this as my app was using ANSI line positioning and resets back into
nsh looked messy). There are all sorts of fun things which could be done
with ANSI terminal emulation.

Thanks,
See you all tonight. Where you’ll see my demo going crazy with ANSI colour
codes.

Christian