Updated tmux plugin so it can be ran from outside of zsh, useful for binds as I've got with my XMoand configs.

This commit is contained in:
ArcheyDevil 2012-04-12 18:01:10 +10:00
commit eda13234b3

8
plugins/tmux/tmux.plugin.zsh Normal file → Executable file
View file

@ -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