From: Simon Ruderich Date: Sat, 21 Jun 2014 12:35:22 +0000 (+0200) Subject: use set -eu X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=e189acb4d63724d096f6db3b26fbedfbdcda183d use set -eu Also correct check if $SSH_CONNECTION is set. --- diff --git a/setup.sh b/setup.sh index 08efb21..ee5fed1 100755 --- a/setup.sh +++ b/setup.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . -set -e +set -eu . ../lib.sh @@ -132,7 +132,7 @@ if terminal_available screen-256color; then echo 'screenrc: running on virtual terminal, disabling 256 colors' # Called through SSH connection, assume the local system supports 256 # colors. - elif test -n "$SSH_CONNECTION"; then + elif test -n "${SSH_CONNECTION:+set}"; then use_256colors=1 # We have rxvt-unicode installed, check if it supports 256 colors. elif installed urxvt; then