Commit 778ae577 authored by Josh Matthews's avatar Josh Matthews
Browse files

Tmux plugin now just runs tmux if any extra args are given.

parent 3aef6793
...@@ -36,7 +36,12 @@ fi ...@@ -36,7 +36,12 @@ fi
# Override tmux with our function # Override tmux with our function
function zsh_tmux_plugin_start() function zsh_tmux_plugin_start()
{ {
if [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]] # We have other arguments, just run them
if [[ ! -n "$@" ]]
then
\tmux $@
# Try to connect to an existing session.
elif [[ "$ZSH_TMUX_AUTOCONNECT" == "true" ]]
then then
\tmux attach || tmux -f $fixed_config new-session \tmux attach || tmux -f $fixed_config new-session
[[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit [[ "$ZSH_TMUX_AUTOQUIT" == "true" ]] && exit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment