From: Simon Ruderich Date: Mon, 16 Sep 2013 21:46:12 +0000 (+0200) Subject: zsh/rc: Check if the multiplexer is available. X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=00f6bae72e77b3772413cfa5b7cf790b6e670935 zsh/rc: Check if the multiplexer is available. --- diff --git a/zsh/rc b/zsh/rc index 8b5a333..6b646b5 100644 --- a/zsh/rc +++ b/zsh/rc @@ -853,6 +853,15 @@ source_config ~/.zsh/rc.local # RUN COMMANDS +# Make sure the multiplexer is available. Otherwise the exec terminates our +# session. +if [[ -n $zshrc_use_multiplexer ]]; then + if ! (( $+commands[$zshrc_use_multiplexer] )); then + echo "Multiplexer '$zshrc_use_multiplexer' not found." >&2 + zshrc_use_multiplexer= + fi +fi + # If not already in screen or tmux, reattach to a running session or create a # new one. This also starts screen/tmux on a remote server when connecting # through ssh.