Created
December 7, 2016 17:18
-
-
Save damc-dev/fcb8e816da898cc94e37227f461eb3c0 to your computer and use it in GitHub Desktop.
Check if host supports 256-color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 256-color mode not supported on this host | |
if echo $TERM | grep -q -- '-256color'; then | |
echo -e '\n\n256-color mode not supported on this host. Reverting TERM...\n' | |
export TERM=`echo -n $TERM | sed 's/-256color//'` | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment