Skip to content

Instantly share code, notes, and snippets.

@earendildev
Forked from shawnbot/xterm-256color.md
Created July 18, 2022 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earendildev/9d691e00c89259f7203f00c127ec3df9 to your computer and use it in GitHub Desktop.
Save earendildev/9d691e00c89259f7203f00c127ec3df9 to your computer and use it in GitHub Desktop.
Make OS X Terminal respect 256 colors in screen

1. Ensure that Terminal declares itself as "xterm-256color"

Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color.

2. Build a version of screen that supports 256 colors

This is easy with homebrew:

brew install screen

When this finishes you'll have a new binary in /usr/local/bin/screen.

3. Add the new screen binary to your path

Add /usr/local/bin to the front of your $PATH so that your shell uses this binary, and not the one in /usr/bin (you can confirm that it's using the correct one with which screen). If you're using the bash, this goes into your .bash_profile:

PATH="/usr/local/bin:$PATH"

If you're using another shell, then you probably already know where this goes. :)

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