From d8358cdccbae815880174c531d23780c3839e68c Mon Sep 17 00:00:00 2001 From: yeti Date: Tue, 13 May 2025 15:15:56 +0100 Subject: [PATCH] feat(ssh): set environment variable TERM=tmux-256color for correct colours --- ssh_router.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh_router.sh b/ssh_router.sh index aa6ff0b..e0efab7 100755 --- a/ssh_router.sh +++ b/ssh_router.sh @@ -151,7 +151,7 @@ rw) fi log "⚡ $PERSON is working on $WORKSPACE's workspace" - if ! podman exec -it --user "$DEV_USER" "$WORKSPACE" tmux attach -t "$TMUX_SESSION"; then + if ! podman exec -it -e TERM=tmux-256color --user "$DEV_USER" "$WORKSPACE" tmux attach -t "$TMUX_SESSION"; then log "❌ Could not attach to tmux session. Please contact admin or try again later." exit 1 fi @@ -163,7 +163,7 @@ rw) ro) if (podman container exists "$WORKSPACE" && podman inspect -f '{{.State.Running}}' "$WORKSPACE" | grep -q true) >/dev/null 2>&1; then log "📜 $PERSON is viewing $WORKSPACE's workspace" - if ! podman exec -it --user "$DEV_USER" "$WORKSPACE" tmux attach -r -t "$TMUX_SESSION"; then + if ! podman exec -it -e TERM=tmux-256color --user "$DEV_USER" "$WORKSPACE" tmux attach -r -t "$TMUX_SESSION"; then log "❌ Could not attach to tmux session. Please contact admin or try again later." exit 1 fi