Mercurial > dotfiles
comparison .zshrc @ 322:a7f5b0526a51
zshrc: second attempt to make screen message not break
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 30 Jan 2013 20:11:46 -0600 |
parents | 1936d9f48e0b |
children | b78aa03c0c00 |
comparison
equal
deleted
inserted
replaced
321:e9932cf1692f | 322:a7f5b0526a51 |
---|---|
7 # Login greeting ------------------ | 7 # Login greeting ------------------ |
8 | 8 |
9 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then | 9 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then |
10 # Use /bin/which explicitly because we have a shell function | 10 # Use /bin/which explicitly because we have a shell function |
11 # that confuses the zsh built-in which. | 11 # that confuses the zsh built-in which. |
12 if env which screen > /dev/null; then | 12 if sh -c 'which screen' > /dev/null; then |
13 detached_screens=`screen -list | grep Detached | sed -e 's/ (Detached)//'` | 13 detached_screens=`screen -list | grep Detached | sed -e 's/ (Detached)//'` |
14 if [ ! -z "$detached_screens" ]; then | 14 if [ ! -z "$detached_screens" ]; then |
15 echo "+---------------------------------------+" | 15 echo "+---------------------------------------+" |
16 echo "| Detached screens are available: |" | 16 echo "| Detached screens are available: |" |
17 echo "$detached_screens" | 17 echo "$detached_screens" |