mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
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:
parent
bb3ba5b0c3
commit
eda13234b3
1 changed files with 7 additions and 1 deletions
8
plugins/tmux/tmux.plugin.zsh
Normal file → Executable file
8
plugins/tmux/tmux.plugin.zsh
Normal file → Executable file
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/bin/zsh
|
||||||
# tmux plugin
|
# tmux plugin
|
||||||
# Copyright (C) 2011 Simon Gomizelj
|
# Copyright (C) 2011 Simon Gomizelj
|
||||||
#
|
#
|
||||||
|
|
@ -35,6 +36,11 @@ if (( $+commands[tmux] )); then
|
||||||
[[ -n $TMUX ]] && tmux switch -t $1 \
|
[[ -n $TMUX ]] && tmux switch -t $1 \
|
||||||
|| tmux attach -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
|
else
|
||||||
omz_log_msg "tmux: plugin requires tmux"
|
omz_log_mgs "tmux: plugin requires tmux"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue