You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Trejkaz <tr...@trypticon.org> on 2009/01/05 05:06:01 UTC

Re: The Command API (Felix Shell)

On Thu, Jan 1, 2009 at 2:10 AM, Stevens Gestin <sg...@gmail.com> wrote:
> Hi,
> I've already sent an email concerning limitation of Command interface few
> months ago. I totally developted a shell engine from scratch.
>
> My shell is registering in OSGI container as a service. Other services
> register ShellExtension. Registration of extension initiate an update
> process on the shell service. Shell extension provides a simple interface
> which allow retrieval of extension commands. Each command provides
> information like short help, complete help, description and version.
>
> You can chain commands, use variables (in global shell context or session
> context). It supports short and long option (- and -- flags), whitespaces
> and some other features.

Do you build on top of the existing Felix Shell for all of this, or is
it a complete replacement?  I was starting to think that maybe I would
just invent a new command interface which extends Felix's, and a
convenience base class to help implementing Felix's harder API
(basically, parse the command-line from the abstract class.)  Then I
could still use Felix's shell, but potentially make my own shell
interface which treats instances of my command class as special (would
have to look up each kind of command service...)

More importantly though, is your shell code available?  It sounds like
a pretty decent foundation.

In my case using an overridable context might turn out to be a
particularly good idea, as sometimes I want to know where the command
came from (some commands should work only if spoken in public, not on
the shell.  But it seems I shouldn't be inventing a new command
interface just for chatroom commands, if it's still text commands
being executed at the end of the day.)

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org