Skip to content

Instantly share code, notes, and snippets.

@martisj
Created February 19, 2013 23:24
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 martisj/4991212 to your computer and use it in GitHub Desktop.
Save martisj/4991212 to your computer and use it in GitHub Desktop.
shellgist
if $COLORTERM gnome-* and $TERM = xterm and infocmp gnome-256color >/dev/null 2>&1
set -x TERM=gnome-256color
else if infocmp xterm-256color >/dev/null 2>&1
set -x TERM=xterm-256color
end
if [[tput setaf 1]] &> /dev/null
tput sgr0
if [[ tput colors -ge 256 ]] 2>/dev/null
set -x MAGENTA (tput setaf 9)
set -x ORANGE (tput setaf 172)
set -x GREEN (tput setaf 190)
set -x PURPLE (tput setaf 141)
set -x WHITE (tput setaf 256)
else
set -x MAGENTA (tput setaf 5)
set -x ORANGE (tput setaf 4)
set -x GREEN (tput setaf 2)
set -x PURPLE (tput setaf 1)
set -x WHITE (tput setaf 7)
end
set -x BOLD (tput bold)
set -x RESET (tput sgr0)
else
set -x MAGENTA "\033[1;31m"
set -x ORANGE "\033[1;33m"
set -x GREEN "\033[1;32m"
set -x PURPLE "\033[1;35m"
set -x WHITE "\033[1;37m"
set -x BOLD ""
set -x RESET "\033[m"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment