From 262fb7cc18f5702d6b3ad0f92aebe2b904a728a1 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Mon, 24 Apr 2017 22:46:15 +0100 Subject: [PATCH] Added tmux default --- bash_aliases | 1 + zshrc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bash_aliases b/bash_aliases index a5f96e4..01ea0a4 100644 --- a/bash_aliases +++ b/bash_aliases @@ -64,3 +64,4 @@ if type "$docker" > /dev/null; then alias docker-rm-untagged='docker rmi -f $(docker images | grep "^" | awk "{print $3}")' fi +alias tmux='tmux attach || tmux' diff --git a/zshrc b/zshrc index f6dc03d..2b81dbb 100644 --- a/zshrc +++ b/zshrc @@ -83,3 +83,7 @@ source ~/.bash_aliases export PATH=$PATH:/home/fergalm/dotfiles/bin source '/home/fergalm/lib/azure-cli/az.completion' + +# If not running interactively, do not do anything +#[[ $- != *i* ]] && return +#[[ -z "$TMUX" ]] && exec tmux