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

Possible to have prompt at bottom of terminal at all times? #166

Open
adamreisnz opened this issue Nov 8, 2016 · 3 comments
Open

Possible to have prompt at bottom of terminal at all times? #166

adamreisnz opened this issue Nov 8, 2016 · 3 comments

Comments

@adamreisnz
Copy link

adamreisnz commented Nov 8, 2016

I have a scenario where my app connects to two different services, a local piece of hardware via serial port, and a remote server via sockets.

Once the hardware connection is established, I show a prompt where the user can enter manual commands at the terminal if needed.

This works fine, but once the server connection is established, which is usually after the device connection is already there, it logs a success message which get pasted on top of the prompt.

This is not a major issue, but kind of ugly, and results in something like this on the terminal:

Connecting to device on port /dev/cu.usbserial-FT8X0FP7 ...
Connecting to server at http://localhost:8081/ ...
Connected to device
Enter command: Connected to server
 //<-- prompt is now here on a new line

Ideally, I would like to see subsequent console log lines cover the Enter command: bit and for that line to move down, as follows:

Connecting to device on port /dev/cu.usbserial-FT8X0FP7 ...
Connecting to server at http://localhost:8081/ ...
Connected to device
Connected to server
Enter command: //<-- prompt here

Any thoughts on how to accomplish this?

Note: I don't want to await both connections and only then show the command input, as the server connection is not required.

@hawkins
Copy link

hawkins commented Jan 3, 2017

I'm running into the same issue, did you ever find a solution? I've looked at using Blessed, but it seems too complicated for my project's needs.

@adamreisnz
Copy link
Author

Nope, never got a reply here, and didn't bother to try and solve it myself as it was a minor inconvenience only =/

@RMarjanovic
Copy link

This is quite a late reply (since I just stumbled upon your question), however I think inquirer-menu might solve your problems @adamreisnz.

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