usr/bin/byobu: handle unset term in tput 256 color check

This commit is contained in:
Dustin Kirkland 2010-04-24 12:22:33 -05:00
commit 476e623342
2 changed files with 2 additions and 1 deletions

1
debian/changelog vendored
View file

@ -4,6 +4,7 @@ byobu (2.72) unreleased; urgency=low
* usr/share/man/man1/byobu.1: document a sample custom script using * usr/share/man/man1/byobu.1: document a sample custom script using
custom colors, LP: #568967 custom colors, LP: #568967
* usr/bin/byobu: LANG=C before grepping for text * usr/bin/byobu: LANG=C before grepping for text
* usr/bin/byobu: handle unset term in tput 256 color check
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 22 Apr 2010 12:31:20 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Thu, 22 Apr 2010 12:31:20 -0500

View file

@ -42,7 +42,7 @@ printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell" grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="motd+shell"
# Check if our terminfo supports 256 colors # Check if our terminfo supports 256 colors
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors) -eq 256 ] && SCREEN_TERM="-T screen-256color" [ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors 2>/dev/null || echo 0) -eq 256 ] && SCREEN_TERM="-T screen-256color"
# Create or update ssh-agent socket # Create or update ssh-agent socket
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then