Skip to content

Commit 8a1b624

Browse files
author
Eliot Eshelman
committed
Add proper support for CSH shell
1 parent bd64cfd commit 8a1b624

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

usr/libexec/microway/interactive_batch_script

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,9 @@ if [[ ! -r "${SCREEN_RC}" ]]; then
6363
fi
6464

6565

66-
srun --pty --nodes=1 /usr/bin/screen -c "${SCREEN_RC}" -s /bin/bash -Dm -S "session$SLURM_JOB_ID"
66+
if [[ -n "${SHELL}" ]]; then
67+
srun --pty --nodes=1 /usr/bin/screen -c "${SCREEN_RC}" -s "${SHELL}" -Dm -S "session$SLURM_JOB_ID"
68+
else
69+
srun --pty --nodes=1 /usr/bin/screen -c "${SCREEN_RC}" -s /bin/bash -Dm -S "session$SLURM_JOB_ID"
70+
fi
6771

usr/libexec/microway/interactive_connection_script

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ fi
9696

9797
# Start up a shell session for the user
9898
screen -S "$SCREENSESSION" -X setenv SPLASH_RCFILE /usr/libexec/microway/interactive_splash_rcfile
99-
screen -S "$SCREENSESSION" -X screen -t "bash" 1 bash -i -l
99+
if [[ "${SHELL}" == "/bin/csh" ]]; then
100+
screen -S "$SCREENSESSION" -X screen -t "csh" 1 csh -l
101+
else
102+
screen -S "$SCREENSESSION" -X screen -t "bash" 1 bash -i -l
103+
fi
100104

101105
# Remove the META tab, which has outlived its usefulness
102106
screen -p0 -S "$SCREENSESSION" -X kill

0 commit comments

Comments
 (0)