plugins/tmux-autoattach: Automatically attach to session 0 by default

this corrects the plugin not connecting back to the session by default
This commit is contained in:
Phillip Ledger
2022-05-18 19:21:59 +10:00
committed by Koichi Murase
parent cb7238fb8f
commit fb978ce75e

View File

@@ -8,11 +8,11 @@
[ -z "$OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR" ] && OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR="detach"
_osh_plugin_tmux_autoattach_exit() {
[ -z "$TMUX" ] && tmux -2u new -A && exit
[ -z "$TMUX" ] && tmux -2u new -As0 && exit
}
_osh_plugin_tmux_autoattach_detach() {
[ -z "$TMUX" ] && tmux -2u new -A
[ -z "$TMUX" ] && tmux -2u new -As0
}
case "$OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR" in