comparison .zshrc @ 307:e37b00236907

zshrc: work around my shell function that turns on utf8 in screen The zsh built in which was getting confused by the function, and always claimed screen was installed. I'm finally running into machines with tmux but not screen, so I noticed.
author Augie Fackler <raf@durin42.com>
date Sat, 19 Jan 2013 19:29:58 -0600
parents c7e8311eb2ba
children 1936d9f48e0b
comparison
equal deleted inserted replaced
306:ae22ef7859eb 307:e37b00236907
5 done 5 done
6 6
7 # Login greeting ------------------ 7 # Login greeting ------------------
8 8
9 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then 9 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then
10 if which screen > /dev/null; then 10 # Use /bin/which explicitly because we have a shell function
11 # that confuses the zsh built-in which.
12 if /bin/which screen > /dev/null; then
11 detached_screens=`screen -list | grep Detached | sed -e 's/ (Detached)//'` 13 detached_screens=`screen -list | grep Detached | sed -e 's/ (Detached)//'`
12 if [ ! -z "$detached_screens" ]; then 14 if [ ! -z "$detached_screens" ]; then
13 echo "+---------------------------------------+" 15 echo "+---------------------------------------+"
14 echo "| Detached screens are available: |" 16 echo "| Detached screens are available: |"
15 echo "$detached_screens" 17 echo "$detached_screens"