浏览代码

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

Josh Matthews 12 年之前
父节点
当前提交
778ae57772
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      plugins/tmux/tmux.plugin.zsh

+ 6 - 1
plugins/tmux/tmux.plugin.zsh

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