Last active
March 4, 2023 14:15
-
-
Save rebane2001/81e3e7657bf29d6c67aa2c8c4403bcc4 to your computer and use it in GitHub Desktop.
Run a command in a new tmux pane in the same window (not sure about multiple sessions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TMUX_WINDOW="$(tmux display-message -p '#I')" | |
function run_pane { | |
tmux split-window -h -t "${TMUX_WINDOW}" "$1" | |
# Wait for exit version: | |
# waitid="$(openssl rand -hex 16)" | |
# tmux split-window -h -t "${TMUX_WINDOW}" "$1; tmux wait -S ${waitid}" | |
# tmux wait "${waitid}" | |
} | |
# run_pane 'python3 verbose_script.py' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment