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

Un-Bold/-Dim completely absent from ANSI escape codes #2174

Closed
Qix- opened this issue May 30, 2017 · 11 comments
Closed

Un-Bold/-Dim completely absent from ANSI escape codes #2174

Qix- opened this issue May 30, 2017 · 11 comments
Labels

Comments

@Qix-
Copy link

Qix- commented May 30, 2017

It appears [21m and [22m are completely absent from the list of supported render mode escapes in the new VT-like functionality Windows supports.

You have [24m and [27m, but no way to reset bold at all. This needs to be fixed because it's breaking a ton of people trying to run Node.js without LibUV's Windows TTY fallback, and I'm sure it'll break a much larger crowd as adoption rises.

Ref chalk/chalk#145 // cc @sindresorhus

@zadjii-msft
Copy link
Member

I've already got this on the backlog :)
MSFT:9553354

libuv/libuv#438
libuv/libuv#439
chalk/chalk#76

@Qix-
Copy link
Author

Qix- commented May 30, 2017

Thank you @zadjii-msft, I appreciate that. Any estimate on ETA? I'd rather not have to write a workaround for chalk if I can have downstreamers hold off for a while longer.

@zadjii-msft
Copy link
Member

@qix I'd say it's probably not a very high priority to get into this release unfortunately. I can add it to my bug backlog, but I'd say it's not likely :/

@therealkenc
Copy link
Collaborator

#2027

@Qix-
Copy link
Author

Qix- commented May 30, 2017

@therealkenc That's unrelated.

@zadjii-msft
Copy link
Member

I just submitted the fix for this :)

... well okay, I submitted the fix for UnBold. Double underline would require a lot more work to support, and that won't make the cut for Fall Creator's Update. But UnBold should be out to insiders in the next few weeks.

@Qix-
Copy link
Author

Qix- commented Jun 15, 2017

@zadjii-msft Thank you <3 I know a lot of people will appreciate this.

// cc @sindresorhus

@alancnet
Copy link

@Qix- @zadjii-msft Thank you! I'm very happy to see the issue I opened back in March has seemed to take on a life of its own which ultimately made its way back to Microsoft for a fix. I really appreciate your efforts! Truly!

@Qix-
Copy link
Author

Qix- commented Nov 10, 2017

@zadjii-msft Hey! Just checking in - has this been released? :)

@zadjii-msft
Copy link
Member

@Qix- I'm pretty sure it's in Fall Creator's Update, yea.

image

import sys
import time

def csi(seq):
    sys.stdout.write('\x1b[{}'.format(seq))

def write(s):
    sys.stdout.write(s)

if __name__ == '__main__':
    print('this first test is the unbold test')
    print('Make sure the foo is bright, the bar is not')
    print('\E[1;32mfoo\E[22mbar\E[mTest')

    csi('1;32m')
    write('foo')
    csi('22m')
    write('bar')
    csi('m')
    write('Test')
    print('')

    csi('1;33m')
    write('foo')
    csi('22m')
    write('bar')
    csi('m')
    write('Test')
    print('')

    csi('1;34m')
    write('foo')
    csi('22m')
    write('bar')
    csi('m')
    write('Test')
    print('')

@Qix-
Copy link
Author

Qix- commented Nov 10, 2017

Awesome - thanks so much @zadjii-msft <3

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

No branches or pull requests

4 participants