You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Guillaume Nodet <gn...@apache.org> on 2016/10/12 15:57:27 UTC

[DISCUSS] Gogo commands completion data

I'm working on trying to nicely integrate gogo commands.
The new gogo-jline bundle has a very nice way to allow external
configuration for command completion. For example, one need to execute the
script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
to add full completion to the Karaf shell once you have the scr bundle
installed (it always provides gogo commands).  Other examples are available
at
https://github.com/apache/felix/blob/trunk/gogo/jline/src/main/resources/gosh_profile

The question is : how to provide such a script.
One possibility would be to have a dedicated folder such as etc/scripts/
where all scripts would be loaded when a session is started. We could then
reference those files in features so that they are copied when features are
installed.
This would allow leveraging the <configfile> feature xml element.

Do you guys have better ideas ?

-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [DISCUSS] Gogo commands completion data

Posted by Matt Pavlovich <ma...@gmail.com>.
+1 etc/scripts

+1 being able to use <configFile/> element


On 10/12/16 10:57 AM, Guillaume Nodet wrote:
> I'm working on trying to nicely integrate gogo commands.
> The new gogo-jline bundle has a very nice way to allow external
> configuration for command completion. For example, one need to execute the
> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
> to add full completion to the Karaf shell once you have the scr bundle
> installed (it always provides gogo commands).  Other examples are available
> at
> https://github.com/apache/felix/blob/trunk/gogo/jline/src/main/resources/gosh_profile
>
> The question is : how to provide such a script.
> One possibility would be to have a dedicated folder such as etc/scripts/
> where all scripts would be loaded when a session is started. We could then
> reference those files in features so that they are copied when features are
> installed.
> This would allow leveraging the <configfile> feature xml element.
>
> Do you guys have better ideas ?
>


Re: [DISCUSS] Gogo commands completion data

Posted by Achim Nierbeck <bc...@googlemail.com>.
fully agree on the scr ones and those posix commands.
We don't need to re-invent the wheel a fifth time ;)

regards, Achim


2016-10-13 11:47 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> 2016-10-13 11:28 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:
>
> > Just one question,
> > what's the effect on already existing Karaf commands and those
> completions
> > etc.
> > If that is not affected at all I've got no complaints ;)
> >
>
> Existing commands are not affected.
>
> To achieve the above, I'm using a completer which delegate to both the
> completer for karaf commands and the gogo-jline completer.
> One change in jline3 made that easy, as jline3 completers do not have to
> filter the completions, and jline will filter non matching completion
> candidates itself.  In particular, this allow to do typos corrections ;-)
>
> That said, I think we should get rid of duplicated commands, such as the
> posix / procedural ones (each, if, grep, less, etc...) and the ones that
> are provided by projects directly such as the scr commands.
>
>
> >
> > regards, Achim
> >
> >
> > 2016-10-12 18:41 GMT+02:00 Guillaume Nodet <gn...@apache.org>:
> >
> > > The problem is to obtain the list of scripts that needs to be loaded
> > > somehow.
> > > If we somehow include (using the source command for example), it means
> we
> > > need to copy the script file *and* modify another script, which may be
> a
> > > bit more complicated than necessary.
> > >
> > > 2016-10-12 18:38 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> > >
> > > > Hi Guillaume,
> > > >
> > > > what about a etc/gosh_profilerc that can load other scripts ?
> > > >
> > > > Regards
> > > > JB
> > > >
> > > >
> > > > On 10/12/2016 05:57 PM, Guillaume Nodet wrote:
> > > >
> > > >> I'm working on trying to nicely integrate gogo commands.
> > > >> The new gogo-jline bundle has a very nice way to allow external
> > > >> configuration for command completion. For example, one need to
> execute
> > > the
> > > >> script at https://gist.github.com/gnodet/
> > 18de68d57fc959efb7f9e4766415ff
> > > 5e
> > > >> to add full completion to the Karaf shell once you have the scr
> bundle
> > > >> installed (it always provides gogo commands).  Other examples are
> > > >> available
> > > >> at
> > > >> https://github.com/apache/felix/blob/trunk/gogo/jline/src/
> > > >> main/resources/gosh_profile
> > > >>
> > > >> The question is : how to provide such a script.
> > > >> One possibility would be to have a dedicated folder such as
> > etc/scripts/
> > > >> where all scripts would be loaded when a session is started. We
> could
> > > then
> > > >> reference those files in features so that they are copied when
> > features
> > > >> are
> > > >> installed.
> > > >> This would allow leveraging the <configfile> feature xml element.
> > > >>
> > > >> Do you guys have better ideas ?
> > > >>
> > > >>
> > > > --
> > > > Jean-Baptiste Onofré
> > > > jbonofre@apache.org
> > > > http://blog.nanthrax.net
> > > > Talend - http://www.talend.com
> > > >
> > >
> > >
> > >
> > > --
> > > ------------------------
> > > Guillaume Nodet
> > > ------------------------
> > > Red Hat, Open Source Integration
> > >
> > > Email: gnodet@redhat.com
> > > Web: http://fusesource.com
> > > Blog: http://gnodet.blogspot.com/
> > >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: [DISCUSS] Gogo commands completion data

Posted by Guillaume Nodet <gn...@apache.org>.
2016-10-13 11:28 GMT+02:00 Achim Nierbeck <bc...@googlemail.com>:

> Just one question,
> what's the effect on already existing Karaf commands and those completions
> etc.
> If that is not affected at all I've got no complaints ;)
>

Existing commands are not affected.

To achieve the above, I'm using a completer which delegate to both the
completer for karaf commands and the gogo-jline completer.
One change in jline3 made that easy, as jline3 completers do not have to
filter the completions, and jline will filter non matching completion
candidates itself.  In particular, this allow to do typos corrections ;-)

That said, I think we should get rid of duplicated commands, such as the
posix / procedural ones (each, if, grep, less, etc...) and the ones that
are provided by projects directly such as the scr commands.


>
> regards, Achim
>
>
> 2016-10-12 18:41 GMT+02:00 Guillaume Nodet <gn...@apache.org>:
>
> > The problem is to obtain the list of scripts that needs to be loaded
> > somehow.
> > If we somehow include (using the source command for example), it means we
> > need to copy the script file *and* modify another script, which may be a
> > bit more complicated than necessary.
> >
> > 2016-10-12 18:38 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> >
> > > Hi Guillaume,
> > >
> > > what about a etc/gosh_profilerc that can load other scripts ?
> > >
> > > Regards
> > > JB
> > >
> > >
> > > On 10/12/2016 05:57 PM, Guillaume Nodet wrote:
> > >
> > >> I'm working on trying to nicely integrate gogo commands.
> > >> The new gogo-jline bundle has a very nice way to allow external
> > >> configuration for command completion. For example, one need to execute
> > the
> > >> script at https://gist.github.com/gnodet/
> 18de68d57fc959efb7f9e4766415ff
> > 5e
> > >> to add full completion to the Karaf shell once you have the scr bundle
> > >> installed (it always provides gogo commands).  Other examples are
> > >> available
> > >> at
> > >> https://github.com/apache/felix/blob/trunk/gogo/jline/src/
> > >> main/resources/gosh_profile
> > >>
> > >> The question is : how to provide such a script.
> > >> One possibility would be to have a dedicated folder such as
> etc/scripts/
> > >> where all scripts would be loaded when a session is started. We could
> > then
> > >> reference those files in features so that they are copied when
> features
> > >> are
> > >> installed.
> > >> This would allow leveraging the <configfile> feature xml element.
> > >>
> > >> Do you guys have better ideas ?
> > >>
> > >>
> > > --
> > > Jean-Baptiste Onofré
> > > jbonofre@apache.org
> > > http://blog.nanthrax.net
> > > Talend - http://www.talend.com
> > >
> >
> >
> >
> > --
> > ------------------------
> > Guillaume Nodet
> > ------------------------
> > Red Hat, Open Source Integration
> >
> > Email: gnodet@redhat.com
> > Web: http://fusesource.com
> > Blog: http://gnodet.blogspot.com/
> >
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [DISCUSS] Gogo commands completion data

Posted by Achim Nierbeck <bc...@googlemail.com>.
Just one question,
what's the effect on already existing Karaf commands and those completions
etc.
If that is not affected at all I've got no complaints ;)

regards, Achim


2016-10-12 18:41 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> The problem is to obtain the list of scripts that needs to be loaded
> somehow.
> If we somehow include (using the source command for example), it means we
> need to copy the script file *and* modify another script, which may be a
> bit more complicated than necessary.
>
> 2016-10-12 18:38 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:
>
> > Hi Guillaume,
> >
> > what about a etc/gosh_profilerc that can load other scripts ?
> >
> > Regards
> > JB
> >
> >
> > On 10/12/2016 05:57 PM, Guillaume Nodet wrote:
> >
> >> I'm working on trying to nicely integrate gogo commands.
> >> The new gogo-jline bundle has a very nice way to allow external
> >> configuration for command completion. For example, one need to execute
> the
> >> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff
> 5e
> >> to add full completion to the Karaf shell once you have the scr bundle
> >> installed (it always provides gogo commands).  Other examples are
> >> available
> >> at
> >> https://github.com/apache/felix/blob/trunk/gogo/jline/src/
> >> main/resources/gosh_profile
> >>
> >> The question is : how to provide such a script.
> >> One possibility would be to have a dedicated folder such as etc/scripts/
> >> where all scripts would be loaded when a session is started. We could
> then
> >> reference those files in features so that they are copied when features
> >> are
> >> installed.
> >> This would allow leveraging the <configfile> feature xml element.
> >>
> >> Do you guys have better ideas ?
> >>
> >>
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: [DISCUSS] Gogo commands completion data

Posted by Guillaume Nodet <gn...@apache.org>.
The problem is to obtain the list of scripts that needs to be loaded
somehow.
If we somehow include (using the source command for example), it means we
need to copy the script file *and* modify another script, which may be a
bit more complicated than necessary.

2016-10-12 18:38 GMT+02:00 Jean-Baptiste Onofré <jb...@nanthrax.net>:

> Hi Guillaume,
>
> what about a etc/gosh_profilerc that can load other scripts ?
>
> Regards
> JB
>
>
> On 10/12/2016 05:57 PM, Guillaume Nodet wrote:
>
>> I'm working on trying to nicely integrate gogo commands.
>> The new gogo-jline bundle has a very nice way to allow external
>> configuration for command completion. For example, one need to execute the
>> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
>> to add full completion to the Karaf shell once you have the scr bundle
>> installed (it always provides gogo commands).  Other examples are
>> available
>> at
>> https://github.com/apache/felix/blob/trunk/gogo/jline/src/
>> main/resources/gosh_profile
>>
>> The question is : how to provide such a script.
>> One possibility would be to have a dedicated folder such as etc/scripts/
>> where all scripts would be loaded when a session is started. We could then
>> reference those files in features so that they are copied when features
>> are
>> installed.
>> This would allow leveraging the <configfile> feature xml element.
>>
>> Do you guys have better ideas ?
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [DISCUSS] Gogo commands completion data

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Guillaume,

what about a etc/gosh_profilerc that can load other scripts ?

Regards
JB

On 10/12/2016 05:57 PM, Guillaume Nodet wrote:
> I'm working on trying to nicely integrate gogo commands.
> The new gogo-jline bundle has a very nice way to allow external
> configuration for command completion. For example, one need to execute the
> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
> to add full completion to the Karaf shell once you have the scr bundle
> installed (it always provides gogo commands).  Other examples are available
> at
> https://github.com/apache/felix/blob/trunk/gogo/jline/src/main/resources/gosh_profile
>
> The question is : how to provide such a script.
> One possibility would be to have a dedicated folder such as etc/scripts/
> where all scripts would be loaded when a session is started. We could then
> reference those files in features so that they are copied when features are
> installed.
> This would allow leveraging the <configfile> feature xml element.
>
> Do you guys have better ideas ?
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSS] Gogo commands completion data

Posted by Christian Schneider <ch...@die-schneider.net>.
The command metadata service API of course would need to live at felix 
gogo. So the plain gogo shell could also make use of it.
We could then provide an extender at karaf that creates these services 
out of the karaf specific commands.

The problem I see with the scripts is how to add them to the karaf shell 
in a modular way. After all you want to just install the bundle with the 
command.
You do not want to additionally have to install a shell script at some 
other place. That is where the magic location for a script file could 
help for the short run.

Christian

On 19.10.2016 13:43, Guillaume Nodet wrote:
> I thought about that, but then, the bundles would be tied to Karaf while
> the goal is to support commands from projects which are not related to
> karaf.  Else, we could just force them to use our own command api if they
> want to support Karaf ;-)
>
> Also remember that scripting offers very nice additional features : it's
> dynamic.  A static completion system would not be able to offer the same
> level, so you'd have to offer an api, and then... well, it's not
> independent anymore, so you've lost the benefit.
>
> The fact that the scripts are external it not necessarily a problem.
> That's the way your unix shell completion works btw ;-)
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [DISCUSS] Gogo commands completion data

Posted by Guillaume Nodet <gn...@apache.org>.
I really think the scripts are more flexible and powerful than command
metadata.
But I agree having to ship them is a pain, so I hope we can find a better
way in the future.  Your proposal of a known location in the bundle makes
sense.

2016-10-19 13:51 GMT+02:00 Christian Schneider <ch...@die-schneider.net>:

> The command metadata service API of course would need to live at felix
> gogo. So the plain gogo shell could also make use of it.
> We could then provide an extender at karaf that creates these services out
> of the karaf specific commands.
>
> The problem I see with the scripts is how to add them to the karaf shell
> in a modular way. After all you want to just install the bundle with the
> command.
> You do not want to additionally have to install a shell script at some
> other place. That is where the magic location for a script file could help
> for the short run.
>
> Christian
>
> On 19.10.2016 13:43, Guillaume Nodet wrote:
>
>> I thought about that, but then, the bundles would be tied to Karaf while
>> the goal is to support commands from projects which are not related to
>> karaf.  Else, we could just force them to use our own command api if they
>> want to support Karaf ;-)
>>
>> Also remember that scripting offers very nice additional features : it's
>> dynamic.  A static completion system would not be able to offer the same
>> level, so you'd have to offer an api, and then... well, it's not
>> independent anymore, so you've lost the benefit.
>>
>> The fact that the scripts are external it not necessarily a problem.
>> That's the way your unix shell completion works btw ;-)
>>
>>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [DISCUSS] Gogo commands completion data

Posted by Christian Schneider <ch...@die-schneider.net>.
The command metadata service API of course would need to live at felix 
gogo. So the plain gogo shell could also make use of it.
We could then provide an extender at karaf that creates these services 
out of the karaf specific commands.

The problem I see with the scripts is how to add them to the karaf shell 
in a modular way. After all you want to just install the bundle with the 
command.
You do not want to additionally have to install a shell script at some 
other place. That is where the magic location for a script file could 
help for the short run.

Christian

On 19.10.2016 13:43, Guillaume Nodet wrote:
> I thought about that, but then, the bundles would be tied to Karaf while
> the goal is to support commands from projects which are not related to
> karaf.  Else, we could just force them to use our own command api if they
> want to support Karaf ;-)
>
> Also remember that scripting offers very nice additional features : it's
> dynamic.  A static completion system would not be able to offer the same
> level, so you'd have to offer an api, and then... well, it's not
> independent anymore, so you've lost the benefit.
>
> The fact that the scripts are external it not necessarily a problem.
> That's the way your unix shell completion works btw ;-)
>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [DISCUSS] Gogo commands completion data

Posted by Guillaume Nodet <gn...@apache.org>.
I thought about that, but then, the bundles would be tied to Karaf while
the goal is to support commands from projects which are not related to
karaf.  Else, we could just force them to use our own command api if they
want to support Karaf ;-)

Also remember that scripting offers very nice additional features : it's
dynamic.  A static completion system would not be able to offer the same
level, so you'd have to offer an api, and then... well, it's not
independent anymore, so you've lost the benefit.

The fact that the scripts are external it not necessarily a problem.
That's the way your unix shell completion works btw ;-)

2016-10-19 13:14 GMT+02:00 Christian Schneider <ch...@die-schneider.net>:

> Not sure if the script approach is good for the long run.
>
> What we could do with it though is to provide a script in a magic location
> in each bundle.
> The shell could then dynamically add and remove the scripts as the bundles
> are started / stopped.
> Does that make sense ?
>
> For the long run I think we could have a service that provides this
> information. Kind of a command metadata service.
> A bundle could either offer such a service manually or it could be created
> by an extender from annotation data.
> Such a solution could then also cover the plain karaf commands.
>
> Christian
>
> On 12.10.2016 17:57, Guillaume Nodet wrote:
>
>> I'm working on trying to nicely integrate gogo commands.
>> The new gogo-jline bundle has a very nice way to allow external
>> configuration for command completion. For example, one need to execute the
>> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
>> to add full completion to the Karaf shell once you have the scr bundle
>> installed (it always provides gogo commands).  Other examples are
>> available
>> at
>> https://github.com/apache/felix/blob/trunk/gogo/jline/src/
>> main/resources/gosh_profile
>>
>> The question is : how to provide such a script.
>> One possibility would be to have a dedicated folder such as etc/scripts/
>> where all scripts would be loaded when a session is started. We could then
>> reference those files in features so that they are copied when features
>> are
>> installed.
>> This would allow leveraging the <configfile> feature xml element.
>>
>> Do you guys have better ideas ?
>>
>>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Re: [DISCUSS] Gogo commands completion data

Posted by Christian Schneider <ch...@die-schneider.net>.
Not sure if the script approach is good for the long run.

What we could do with it though is to provide a script in a magic 
location in each bundle.
The shell could then dynamically add and remove the scripts as the 
bundles are started / stopped.
Does that make sense ?

For the long run I think we could have a service that provides this 
information. Kind of a command metadata service.
A bundle could either offer such a service manually or it could be 
created by an extender from annotation data.
Such a solution could then also cover the plain karaf commands.

Christian

On 12.10.2016 17:57, Guillaume Nodet wrote:
> I'm working on trying to nicely integrate gogo commands.
> The new gogo-jline bundle has a very nice way to allow external
> configuration for command completion. For example, one need to execute the
> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
> to add full completion to the Karaf shell once you have the scr bundle
> installed (it always provides gogo commands).  Other examples are available
> at
> https://github.com/apache/felix/blob/trunk/gogo/jline/src/main/resources/gosh_profile
>
> The question is : how to provide such a script.
> One possibility would be to have a dedicated folder such as etc/scripts/
> where all scripts would be loaded when a session is started. We could then
> reference those files in features so that they are copied when features are
> installed.
> This would allow leveraging the <configfile> feature xml element.
>
> Do you guys have better ideas ?
>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: [DISCUSS] Gogo commands completion data

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Awesome.

I will take a look. Let me know for the scr commands, I can tackle that.

Regards
JB

On 10/19/2016 11:30 AM, Guillaume Nodet wrote:
> I have committed my changes.
> I still need to replace the karaf scr commands  with the native ones and
> write the completion data for it.
>
> 2016-10-12 17:57 GMT+02:00 Guillaume Nodet <gn...@apache.org>:
>
>> I'm working on trying to nicely integrate gogo commands.
>> The new gogo-jline bundle has a very nice way to allow external
>> configuration for command completion. For example, one need to execute the
>> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
>> to add full completion to the Karaf shell once you have the scr bundle
>> installed (it always provides gogo commands).  Other examples are available
>> at https://github.com/apache/felix/blob/trunk/gogo/jline/
>> src/main/resources/gosh_profile
>>
>> The question is : how to provide such a script.
>> One possibility would be to have a dedicated folder such as etc/scripts/
>> where all scripts would be loaded when a session is started. We could then
>> reference those files in features so that they are copied when features are
>> installed.
>> This would allow leveraging the <configfile> feature xml element.
>>
>> Do you guys have better ideas ?
>>
>> --
>> ------------------------
>> Guillaume Nodet
>> ------------------------
>> Red Hat, Open Source Integration
>>
>> Email: gnodet@redhat.com
>> Web: http://fusesource.com
>> Blog: http://gnodet.blogspot.com/
>>
>>
>
>

-- 
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [DISCUSS] Gogo commands completion data

Posted by Guillaume Nodet <gn...@apache.org>.
I have committed my changes.
I still need to replace the karaf scr commands  with the native ones and
write the completion data for it.

2016-10-12 17:57 GMT+02:00 Guillaume Nodet <gn...@apache.org>:

> I'm working on trying to nicely integrate gogo commands.
> The new gogo-jline bundle has a very nice way to allow external
> configuration for command completion. For example, one need to execute the
> script at https://gist.github.com/gnodet/18de68d57fc959efb7f9e4766415ff5e
> to add full completion to the Karaf shell once you have the scr bundle
> installed (it always provides gogo commands).  Other examples are available
> at https://github.com/apache/felix/blob/trunk/gogo/jline/
> src/main/resources/gosh_profile
>
> The question is : how to provide such a script.
> One possibility would be to have a dedicated folder such as etc/scripts/
> where all scripts would be loaded when a session is started. We could then
> reference those files in features so that they are copied when features are
> installed.
> This would allow leveraging the <configfile> feature xml element.
>
> Do you guys have better ideas ?
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Red Hat, Open Source Integration
>
> Email: gnodet@redhat.com
> Web: http://fusesource.com
> Blog: http://gnodet.blogspot.com/
>
>


-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gnodet@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/