I think one way would be the following: * get the org.apache.karaf.shell.api.console.SessionFactory service from the OSGi registry * register your own org.apache.karaf.shell.api.console.Command implementation using sessionFactory.getRegistry().register(command) * the completer will be retrieved by the shell using command.getCompleter(scoped) and you have full control to share a single instance of the completer * the completer receives the parsed command line, so you can do whatever you want with it
2017-05-18 11:25 GMT+02:00 Dominik Marciniszyn < [email protected]>: > Hi, > > I would like to create one Completer class which will be able to recognise > which command was given by user and I would like to print completion > depends > on command. > > Is it possible or is example how to do this? > > Thank You for any help > > > > -- > View this message in context: http://karaf.922171.n3.nabble. > com/Recognise-commands-in-completer-class-tp4050383.html > Sent from the Karaf - Dev mailing list archive at Nabble.com. > -- ------------------------ Guillaume Nodet
