diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-02-08 19:02:32 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-02-08 19:02:32 +0100 |
commit | 0180ffdb0b7bd031f4fdcb9d12ef3e863421129c (patch) | |
tree | f1b62d0ba0e46e4712df82186a26ce98d938de60 /.zprofile | |
parent | ba52a716026f5ce8cd8a4ec4dbeeb099b2a51b7d (diff) | |
download | dotfiles-0180ffdb0b7bd031f4fdcb9d12ef3e863421129c.tar.gz dotfiles-0180ffdb0b7bd031f4fdcb9d12ef3e863421129c.tar.xz |
zprofile: only run screen if it is installed
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zprofile')
-rw-r--r-- | .zprofile | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,7 +1,8 @@ -screenname=$(screen -list | grep "screen-sh-2") -if [ ! "$screenname" ]; then - exec screen -S "screen-sh-2" -c ~/.screenrc-2 -elif echo $screenname | grep -q "Detached"; then - exec screen -r screen-sh-2 +if type screen &>/dev/null && [[ -e ~/.screenrc-2 ]]; then + screenname=$(screen -list | grep "screen-sh-2") + if [ ! "$screenname" ]; then + exec screen -S "screen-sh-2" -c ~/.screenrc-2 + elif echo $screenname | grep -q "Detached"; then + exec screen -r screen-sh-2 + fi fi - |