diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index f65598358..399de1ccc 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -57,6 +57,19 @@ function _build_tmux_alias { tmux $2 $3 \"\$@\" fi }" + + local f s + f="_omz_tmux_alias_${1}" + s=(${(z)2}) + + eval "function ${f}() { + shift words; + words=(tmux ${@:2} \$words); + ((CURRENT+=${#s[@]}+1)) + _tmux + }" + + compdef "$f" "$1" } alias tksv='tmux kill-server'