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.07k stars 360 forks source link

SSH broken on fish shell #4986

Open marcellourbani opened 3 months ago

marcellourbani commented 3 months ago

Dupe Check

Describe the bug

Fish raises an error as its command line is incompatible with warp's wrapper:

ssh myservrobert

fish: Unsupported use of '='. In fish, please use 'set hook $(printf "{\"hook\": \"SSH\", \"value\": {\"socket_path\": \"~/.ssh/31507\", \"remote_shell\": \"%s\"}}" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \n")'.
hook=$(printf "{\"hook\": \"SSH\", \"value\": {\"socket_path\": \"~/.ssh/31507\", \"remote_shell\": \"%s\"}}" "${SHELL##*/}" | command od -An -v -tx1 | command tr -d " \n")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Connection to myservrobert.bti.local closed.

To reproduce

  1. start fish shell in a warp terminal
  2. try to ssh anywhere

Expected behavior

my remote system prompt

Screenshots

image

Operating system

Linux

Operating system and version

Arch

Shell Version

fish 3.7.1

Current Warp version

v0.2024.05.28.08.02.stable_00

Regression

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

Recent working Warp date

No response

Additional context

works fine if I start it from bash

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

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 3 months ago

Warp has an SSH Wrapper that enables features (like the blocks, prompt, completions, etc.) on remote machines requiring the default prompt on the remote machine to be either bash or zsh (not fish at this time).

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 and work with fish.

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

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