warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.47k stars 376 forks source link

HPC's slurm selector script interferes with warpification #5428

Open Aariq opened 3 weeks ago

Aariq commented 3 weeks ago

Dupe Check

Operating System

MacOS

Operating System and Version

Sonoma 14.16.1

Local Shell Version

zsh 5.9 (x86_64-apple-darwin23.0)

Remote Shell Version

bash 4.2.46(2)-release

Warp Version

v0.2024.10.23.14.49.stable_00

Have you tried commenting out my system & user rc files?

Screenshots

My University HPC login node uses a bash script to switch between different job submission clusters. In that script, it exports PROMPT_COMMAND which seems to interfere with warpification of the terminal. When I first log in, the terminal is warpified, and I'm on the default job sumission cluster, puma. If I switch to a different job submission cluster, say ocelote (this is an alias to a bash command) the terminal is no longer warpified. After typing anything, I can actually delete the custom prompt like it's just text.

On initial log-in:

Screenshot 2024-10-31 at 12 07 45 PM

After switching to elgato:

Screenshot 2024-10-31 at 12 08 16 PM

After deleting the custom prompt:

Screenshot 2024-10-31 at 12 10 16 PM

The bash script that is called when I switch clusters (e.g. with ocelote) ends with export PROMPT_COMMAND and if I echo $PROMPT_COMMAND I get echo -n "(ocelote) "

I suspect this might be an issue with this bash script and not with warp, but wondering if there is a workaround. I tried adding ocelote as a subshell command, but that didn't work.

Include shell xtrace output

WARP_DEBUG_MODE=1 ssh puma
***
The default cluster for job submission is Puma
***
Shortcut commands change the target cluster
-----------------------------------------
Puma:
$ puma
(puma) $
Ocelote:
$ ocelote
(ocelote) $
ElGato:
$ elgato
(elgato) $
-----------------------------------------

(puma)

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore) - linear-label:e7dfaa84-5fdb-4a00-b754-d8912da923fa

None

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

Aariq commented 3 weeks ago

This is an updated version of #2863, so I'll close the older issue.