Re: Change Prompt after executing a command

2019-06-05 Thread Jean-Baptiste Onofré
Hi Matthias, You can register whatever you want in the session and check the session content (like PROMPT_ORIGIN if you want). Regards JB On 05/06/2019 19:32, matthiaw wrote: > Thanks. This works. Is there a possibility to add a session-listener? When i > am in a subshell and set the command "ex

Re: Change Prompt after executing a command

2019-06-05 Thread matthiaw
Thanks. This works. Is there a possibility to add a session-listener? When i am in a subshell and set the command "exit", then i need to set the new prompt, but there is no possibility. I only can "reset" the prompt with dynamic values, when i am excecution my own commands, but not the "default" on

Re: Change Prompt after executing a command

2019-06-04 Thread Jean-Baptiste Onofré
Hi, you can change PROMPT property in the command Session. The command has an access to Session, so you can do: ... public class MyCommand implements Action { @Reference Session session; public Object execute() { session.put(Session.PROMPT, "fooo"); return null; } Regards JB On 04/06/201

Change Prompt after executing a command

2019-06-04 Thread matthiaw
Is it possible to change the session variable "PROMPT" by a executed custom command in a bundle? For example: karaf@root()> item:add Something Created item with id 12345 and content "Hello World!" karaf@root():item:12345>item:change content "42 rules" Changed content of item with id 12345 to "42