cursor position error with multibyte string descriptions #50

Closed
danielking opened this Issue Aug 20, 2012 · 3 comments

3 participants

@danielking

schema:

schema =
    properties:
        'username':
            description: '用户名'
            pattern: /^[a-zA-Z\s\-]+$/
            message: '用户名必须由字母、空格、横线组成'
            required: true
        'password':
            description: '密码'
            required: true
            hidden: true

result:

prompt: 用户名d
prompt: 密码:
{ username: 'd', password: 'a' }

and i have another question:
How to remove the prefix of each line such as "prompt: " "error: ". or place them with other strings

提示: 
错误: 
...
@Marak

I seem to remember this being an issue with node.js core. I can't remember if it's been fixed or not. May I ask which version of node you are running?

As for the logger, it is actually a Winston.logger instance.

see: https://github.com/flatiron/prompt/blob/master/lib/prompt.js#L39

You can find documentation for Winston here : https://github.com/flatiron/winston

@danielking

I'm using node 0.8.7.

@gangstead
a decoupled application framework member

Fixed in latest versions of node:
image

The second question is fixed as of #61 by disabling prompt.message.

@gangstead gangstead closed this Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment