From eda13234b3693dcc2502799a7c891ceb295baad6 Mon Sep 17 00:00:00 2001 From: ArcheyDevil Date: Thu, 12 Apr 2012 18:01:10 +1000 Subject: [PATCH] Updated tmux plugin so it can be ran from outside of zsh, useful for binds as I've got with my XMoand configs. --- plugins/tmux/tmux.plugin.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 plugins/tmux/tmux.plugin.zsh diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh old mode 100644 new mode 100755 index 20c871261..af5046857 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -1,3 +1,4 @@ +#!/bin/zsh # tmux plugin # Copyright (C) 2011 Simon Gomizelj # @@ -35,6 +36,11 @@ if (( $+commands[tmux] )); then [[ -n $TMUX ]] && tmux switch -t $1 \ || tmux attach -t $1 } + + # For those who would like to run this script from outside of zsh. + # ( ie, key bindings to load a prompt ) + [[ $- != *i* ]] && source ~/.zshrc && t $1 + return 0 else - omz_log_msg "tmux: plugin requires tmux" + omz_log_mgs "tmux: plugin requires tmux" fi