Commits

Roger Pate committed 33d4de0

Update author, link, and simplify

Comments (0)

Files changed (1)

+# Author: godlygeek, freenode#vim
 # From: http://vim.pastey.net/116135
-# source from .bashrc
-
-# Set $TERM for libvte terminals that set $TERM wrong (like gnome-terminal)
+# From: http://pastebin.com/vxQQvEhb
+# Set $TERM for libvte terminals that set $TERM wrong (like gnome-terminal).
+# Source from .bashrc.
 {
-  [ "_$TERM" = "_xterm" ] && type ldd grep tput && [ -L "/proc/$PPID/exe" ] && {
+  [ _"$TERM" = _xterm ] && type ldd grep tput && [ -L /proc/$PPID/exe ] && {
     if ldd /proc/$PPID/exe | grep libvte; then
-      if [ "$(tput -Tgnome-256color colors)" = "256" ]; then
+      if [ "$(tput -Tgnome-256color colors)" = 256 ]; then
         TERM=gnome-256color
-      elif [ "$(tput -Txterm-256color colors)" = "256" ]; then
+      elif [ "$(tput -Txterm-256color colors)" = 256 ]; then
         TERM=xterm-256color
       elif tput -T gnome; then
         TERM=gnome
       fi
     fi
   }
-} >/dev/null 2>/dev/null
+} &>/dev/null