start-tmux: check if session is interactive
This commit is contained in:
parent
b053416615
commit
869f4c26fc
1 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
#!/bin/bash
|
||||
tmux new-session -s ansible-devspace -d
|
||||
tmux attach -t ansible-devspace
|
||||
## check interactive shell https://unix.stackexchange.com/questions/26676/how-to-check-if-a-shell-is-login-interactive-batch
|
||||
if [[ $- == *i* ]] ; then
|
||||
tmux new-session -s ansible-devspace -d
|
||||
tmux attach -t ansible-devspace
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue