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
20.89k stars 356 forks source link

Does Warp know how to "run" other shells? #5036

Open Zamana opened 2 months ago

Zamana commented 2 months ago

Dupe Check

Describe the bug

When logging in on a FreeBSD system, with CSHELL as default shell, Warp tries to "run" the init files, and shows this:


export: Command not found.
Illegal variable name.
hook: Undefined variable.
Missing '}'.
if: Expression Syntax.
then: Command not found.
if: Expression Syntax.
then: Command not found.
cat: /etc/motd: No such file or directory
elif: Command not found.
then: Command not found.
cat: /run/motd: No such file or directory
elif: Command not found.
then: Command not found.
cat: /run/motd.dynamic: No such file or directory
elif: Command not found.
then: Command not found.
cat: /usr/lib/motd: No such file or directory
elif: Command not found.
then: Command not found.
cat: /usr/lib/motd.dynamic: No such file or directory
fi: Command not found.
fi: Command not found.
if: Expression Syntax.
then: Command not found.
.: Command not found.
fi: Command not found.
[root@pibsd ~]#```

### To reproduce

Just try to connect to a UNIX system that is not Linux and/or does not use BASH is default shell.

### Expected behavior

A normal login process.

### Screenshots

_No response_

### Operating system

MacOS

### Operating system and version

14.5.0

### Shell Version

tcsh 6.22.04

### Current Warp version

v0.2024.06.11.08.02.stable_03

### Regression

No, this bug or issue has existed throughout my experience using Warp

### Recent working Warp date

06/17/24

### Additional context

_No response_

### Does this block you from using Warp daily?

No

### Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

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

### Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None
dannyneira commented 2 months ago

Hi @Zamana On remote systems, Warp supports bash, zsh. Set the default shell to one of the supported and the SSH wrapper should work.

As a workaround you can add command ssh to your Settings > Subshells > Added commands menu, then run command ssh <user@server> to connect to remote session, this will attempt to enable Warp features as a subshell. The subshell method also supports fish shell.

You can also try disabling the SSH Wrapper by navigating to Settings > Features. Blocks will stop working but with it disabling, SSH should work as normal.

Related docs: https://docs.warp.dev/features/ssh https://docs.warp.dev/features/subshells

On a related note, we're tracking support for Warp on FreeBSD here. https://github.com/warpdotdev/Warp/issues/3248

If those don't work, please let us know.

dannyneira commented 2 months ago

@Zamana did changing the default shell on freebsd system to bash or zsh help with the ssh wrapper?

Zamana commented 2 months ago

Hello.

I haven't had the opportunity to apply this workaround. The FreeBSD system is hardened by the customer in such a way that I am not allowed to use any shell other than the default one.

And I don't have any other FreeBSD to test on at the moment.

But thanks for the suggestion.