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

Already on GitHub? Sign in to your account

Weird formatting of colored prompt message #2

bilalq opened this Issue Feb 23, 2014 · 4 comments


None yet
2 participants

bilalq commented Feb 23, 2014

The prompt message seems to display strangely when a colored message is used. The cursor appears indented far to the right. When hitting backspace, the text moves back to where it should, but the cursor stays where it is. Once another key is pressed, the text goes back to it's indented location.

Both the colors and cli-color modules cause this to happen.

screen shot 2014-02-23 at 1 42 24 pm

bilalq commented Feb 24, 2014

I did a little digging around, and it seems the problem is in the read module that this depends on. I guess this can be marked as closed here.

@bilalq bilalq closed this Feb 24, 2014

bilalq commented Feb 24, 2014

Actually, I may have closed this prematurely. flatiron/prompt handles this issue by monkey-patching the readline setPrompt interface: https://github.com/flatiron/prompt/blob/master/lib/prompt.js

Is that possibly a direction you guys would want to go here?

@bilalq bilalq reopened this Feb 24, 2014


satazor commented Feb 24, 2014

I'm currently in vacation, I will look closer later. Meanwhile feel free to make a PR with the monkey patched solution!


satazor commented Jun 27, 2014

Closing this.

@satazor satazor closed this Jun 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment