tmu 330 B

1234567
  1. #!/usr/bin/env bash
  2. if [ "$(tmux list-panes | wc -l | cut -d' ' -f1)" -ne 1 ]; then
  3. tmux kill-pane -t 1
  4. fi
  5. # https://unix.stackexchange.com/questions/439031/how-to-split-the-window-that-ran-the-tmux-split-window-command-instead-of-the/439032#439032
  6. tmux split-window -dh -t "$TMUX_PANE" "bash --rcfile <(echo '. ~/.bashrc;$*')"