shell question

Correo Fernando-ruiz (E-mail) correo at fernando-ruiz.com
Tue Jun 5 20:15:28 UTC 2001



> -----Mensaje original-----
> De: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
> Enviado el: martes, 05 de junio de 2001 16:19
> Para: Eric Norum
> CC: OUTWATER ~ KEITH J /5G3110; rtems-users at OARcorp.com
> Asunto: Re: shell question
>
>
>
>
> Eric Norum wrote:
> >
> > OUTWATER ~ KEITH J /5G3110 wrote:
> > >
> > > Fernando -
> > > Thanks for the info.
> > > I'm currently registering lots of additional commands
> with the RTEMS monitor
> > > using the RTEMS monotor's command entry type.
> > >
> > > Are you saying that once I've registered the additional
> commands with the RTEMS
> > > monitor that they are automatically availble in the shell?

You can see the cmds.c/register_cmds().
There the process is implemented in 12 lines of code.

A shell monitor command adapter.
A read for all the current commands in rtems-monitor-list
to add the command monitor names in the shell command list.

Only 'exit' is avoided because 'exit' is used to close the telnetd session.

All the monitor command are grouped in the 'monitor' topic for a help more
friendly.

> > >
> > > Also, It would be nice to have command completion (may be
> the ability to type in
> > > partial commands or some typ ef auto-completion)
> > >
> >
> > Does this command interpreter use readline?  If so, command
> completion
> > wouldn't be hard to add and command-line editing and
> history is provided
> > automatically.  If not, why not?  I suppose the big problem would be
> > that readline isn't thread-safe :-(
>
> And AFAIK is pure GPL.

Better only RTEMS license contribution.(IMO)

Reading the rtems-monitor contribution from CJohns I think that a similar
'readline' and history
is simple and possible. A local shell private history can be done.
The CJohns static variables must be passed to task var (My shell
environment).
An easy command line edit can be implemented and THREAD SAFE.
Using the same structure and keys that CJohns.

The completion improvement like TAB KEY (perhaphs another key?)
in bash can be done but I have the next question:

With TAB in bash the posibilities are showed in case of duplicates.
But are the files/binaries or the commands registered the posibilities in
RTEMS environment?
For the registered commands are very easy.
I need also to implement the '*' file expansion in the
command line arguments. (Too hard by the moment).

Anybody has tested this shell rtems extension?
Do you want an example to make it?

My purpose is implement the best shell environment possible in RTEMS tree
in order to avoid the ugly patches every time that a new snaphot is posted.

How I use this software every time that a new application is builded if
this software resides in RTEMS tree source it will be good for me and good
for all the users.

Salu2.

Fernando RUIZ CASAS
home: correo at fernando-ruiz.com
work: fernando.ruiz at ctv.es

>
> > --
> > Eric Norum                                 eric.norum at usask.ca
> > Department of Electrical Engineering       Phone: (306) 966-5394
> > University of Saskatchewan                 FAX:   (306) 966-5407
> > Saskatoon, Canada.
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>




More information about the users mailing list