Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUESTION - How to print prompt back after getting async message #140

Open
paulosimao opened this issue Dec 28, 2020 · 3 comments
Open

QUESTION - How to print prompt back after getting async message #140

paulosimao opened this issue Dec 28, 2020 · 3 comments

Comments

@paulosimao
Copy link

Hi!

I have the following use case:

I setup an ishell session to interact w server. But server can send messages ad-hoc, not only response to commands. In case I get a message from server in the session which is related to a server event (not in response to a command issued by user), I want it do be printed, and the prompt should be shown just after. This is not the situation I get these days - prompt only shows up again if I touch the keyboard (even the right arrow would show the prompt again). Could you help me to figure out how to fix this? This is not a breaking issue for me, but not as good as I would like it to get.

If I was capable of signaling the shell that output has been added, that would be perfect.

Please note I am writing to the screen using Shell.println - never directly through Stdout.

Thanks in advance.

@DriftSec
Copy link

I am in the exact same situation. Any luck figuring this out?

@paulosimao
Copy link
Author

So far, the best I could do is: I moved from the command line to a simple web app (thus no longer using ishell), but I would like to move back to it later.

@shadowshot-x
Copy link

I am not sure how you are handling ad-hoc messages from server. I am aware of using sockets with command line. If you use sockets, whenever you receive a message, an event function can be trigerred and you can pass the ishell context to this. Then you can call Shell.println in this function as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants