The last option is to bypass the argument support.
That means either subclassing the AbstractCommand
and change the ActionPreparator or simply implementing
Function and exporting the object as an osgi service.



On Thu, Dec 6, 2012 at 9:24 AM, Dan Tran <dant...@gmail.com> wrote:

> I did try 'List<String> option, but running into another isue where
>
>   my:command this is single arg "with space and quotes"
>
> Karaf takes out my quotes
>
> I can escape the quote, but then the usage becomes more complicated
>
> Thanks
>
> -Dan
>
> PS fully understanding that dealing space quote are complicated and
> tedious stuff
>
>
> On Thu, Dec 6, 2012 at 12:18 AM, Guillaume Nodet <gno...@gmail.com> wrote:
> > Well, depending on your needs, one possible work around is to
> > define the command as accepting a single argument with the
> > multiple flag consisting of a List<String>.
> > You then have to rebuild the single argument from the string list.
> > However, you'll loose multiple whitespaces between words.
> >
> >
> > On Thu, Dec 6, 2012 at 9:02 AM, Dan Tran <dant...@gmail.com> wrote:
> >>
> >> Hi
> >>
> >> I would like to create a karaf command that can have a single argument
> >> with space like
> >>
> >>     my:command this is my single argument with spaces
> >>
> >> karaf turns it into
> >>
> >>    my:command this
> >>
> >> The work around is
> >>
> >>     my: command 'this is my single argument with spaces'
> >>
> >> Would it possible to to do this without surrounding single quotes?
> >>
> >>
> >> Huge thanks ahead
> >>
> >> -Dan
> >
> >
> >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> > ------------------------
> > FuseSource, Integration everywhere
> > http://fusesource.com
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com

Reply via email to