Add option to use 24bit color in prompt toolkit #9736

Merged
merged 2 commits into from Jul 12, 2016

Projects

None yet

4 participants

@wilywampa
Contributor

This exposes the true (24-bit) color option in prompt_toolkit to IPython's configuration. Same change as this: jupyter/jupyter_console#90

@Carreau
Member
Carreau commented Jul 12, 2016

Great thanks ! Do you think it is worth mentioning in the what's new ?

https://github.com/ipython/ipython/blob/master/docs/source/whatsnew/pr/README.md

I'll let it settle a few hours to leave others a chance to have a look.

@Carreau Carreau added this to the 5.1 milestone Jul 12, 2016
@takluyver takluyver merged commit 3dc4dca into ipython:master Jul 12, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dsblank dsblank commented on the diff Jul 12, 2016
IPython/terminal/interactiveshell.py
@@ -142,6 +142,13 @@ def refresh_style(self):
help="Override highlighting format for specific tokens"
).tag(config=True)
+ true_color = Bool(False,
+ help=("Use 24bit colors instead of 256 colors in prompt highlighting. "
+ "If your terminal supports true color, the following command "
+ "should print 'TRUECOLOR' in orange: "
+ "printf \"\\x1b[38;2;255;100;0mTRUECOLOR\\x1b[0m\\n\"")
@dsblank
dsblank Jul 12, 2016 Contributor

Should that be print(...) ?

@Carreau
Carreau Jul 12, 2016 Member

No, that's a bash command :-)

On Tue, Jul 12, 2016 at 9:10 AM, Doug Blank notifications@github.com
wrote:

In IPython/terminal/interactiveshell.py
#9736 (comment):

@@ -142,6 +142,13 @@ def refresh_style(self):
help="Override highlighting format for specific tokens"
).tag(config=True)

  • true_color = Bool(False,
  •    help=("Use 24bit colors instead of 256 colors in prompt highlighting. "
    
  •          "If your terminal supports true color, the following command "
    
  •          "should print 'TRUECOLOR' in orange: "
    
  •          "printf \"\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n\"")
    

Should that be print(...) ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ipython/ipython/pull/9736/files/7304bca3a12c141bba350addd435ec9d3d0e607e#r70445461,
or mute the thread
https://github.com/notifications/unsubscribe/AAUez8m342vTnu_N6Oai946CMJID10wuks5qU6BGgaJpZM4JJ5SV
.

@dsblank
dsblank Jul 12, 2016 Contributor

Oh, I see. Thanks!

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