diff --git a/tmux-oneshot.sh b/tmux-oneshot.sh index 31ce89f..de65788 100644 --- a/tmux-oneshot.sh +++ b/tmux-oneshot.sh @@ -61,7 +61,9 @@ fi # Send command to session echo "Running command: $COMMAND" -tmux send-keys -t $SESSION "$COMMAND" C-m +printf '%s\n' "$COMMAND" | tmux load-buffer - +tmux paste-buffer -t $SESSION +tmux send-keys -t $SESSION C-m if [ $ATTACH_SESSION -eq 1 ]; then echo "Attaching to tmux session: $SESSION"