Use $TMUX_PANE.

On Sun, 22 Apr 2018, 21:12 Ciro Santilli, <[email protected]> wrote:

>
> https://unix.stackexchange.com/questions/439031/how-to-split-the-window-that-ran-the-tmux-split-window-command-instead-of-the
>
> For example, if I run from window 0:
>
>     sleep 2;tmux split-window -h
>
> and switch to another window 1 with `prefix-n` before the sleep is
> over, the window split happens on the new window 1.
>
> How to make the split always happen on window 0 when the command is
> run from window 0, regardless of the current window?
>
> I have found this possibility:
>
>     win="$(tmux display-message -p '#I')";sleep 2;tmux split-window -h -t
> "$win"
>
> based on:
> https://superuser.com/questions/385472/get-current-window-number-for-bash-prompt
> but I don't like it forces me to run an extra command before `sleep 2`
> (which is a real useful command that takes a long time to finish in my
> use case), which is cumbersome.
>
> Tested on tmux 2.5.
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send an email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to