Use C-M for return carriage for tmux.
Conflicts: stack.sh
This commit is contained in:
parent
c20428241a
commit
3ad59ea151
1 changed files with 11 additions and 6 deletions
17
stack.sh
17
stack.sh
|
@ -915,12 +915,17 @@ fi
|
||||||
function screen_it {
|
function screen_it {
|
||||||
NL=`echo -ne '\015'`
|
NL=`echo -ne '\015'`
|
||||||
if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then
|
if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then
|
||||||
screen -S stack -X screen -t $1
|
if [[ "$USE_TMUX" =~ "yes" ]]; then
|
||||||
# sleep to allow bash to be ready to be send the command - we are
|
tmux new-window -t stack -a -n "$1" "bash"
|
||||||
# creating a new window in screen and then sends characters, so if
|
tmux send-keys "$2" C-M
|
||||||
# bash isn't running by the time we send the command, nothing happens
|
else
|
||||||
sleep 1
|
screen -S stack -X screen -t $1
|
||||||
screen -S stack -p $1 -X stuff "$2$NL"
|
# sleep to allow bash to be ready to be send the command - we are
|
||||||
|
# creating a new window in screen and then sends characters, so if
|
||||||
|
# bash isn't running by the time we send the command, nothing happens
|
||||||
|
sleep 1
|
||||||
|
screen -S stack -p $1 -X stuff "$2$NL"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue