Re: Loops in nsh console

2020-02-27 Thread Gregory Nutt
yes I looked in the source code and I think the reality clashes with the documentation, which says about loops: "...These work from the command line but are primarily intended for use within NSH scripts". I think the code expects loops only in scripts files and not directly in console, because

Re: Loops in nsh console

2020-02-27 Thread Petr Buchta
Hi Alan, yes I looked in the source code and I think the reality clashes with the documentation, which says about loops: "...These work from the command line but are primarily intended for use within NSH scripts". I think the code expects loops only in scripts files and not directly in console, be

Re: Loops in nsh console

2020-02-27 Thread Alan Carvalho de Assis
Hi Peter, There could be many reasons, for example if your CONFIG_NSH_DISABLE_ITEF is enable, etc... $ cd apps/ $ git grep "not valid in this context" nshlib/nsh_parse.c:const char g_fmtcontext[]= "nsh: %s: not valid in this context\n"; Please take a look, this is a good exercise to mast

Loops in nsh console

2020-02-26 Thread Petr Buchta
Hi, I keep exploring nuttx and I'm trying to use loops in the nsh console. The problem is I'm geting this error - "nsh: while: not valid in this context" What I simply tried was: nsh> while true; do myapp; sleep 1; done Even splitting to multiple lines without the semicolon doesn't work. What am