Skip to content

remote: Fix launching from WSL with fish as default shell#48136

Merged
Veykril merged 1 commit intozed-industries:mainfrom
apedersen00:fix-wsl-fish
Feb 2, 2026
Merged

remote: Fix launching from WSL with fish as default shell#48136
Veykril merged 1 commit intozed-industries:mainfrom
apedersen00:fix-wsl-fish

Conversation

@apedersen00
Copy link
Contributor

@apedersen00 apedersen00 commented Feb 1, 2026

Closes #46801

When connecting to WSL2 with fish as the default shell, Zed gets stuck at "Starting proxy". The connection works fine when bash is the default shell.

In start_proxy(), the WSL command was being invoked with:

let proxy_process = match wsl_command_impl(&self.connection_options, "env", &proxy_args, false)

Changing the last argument to true invokes the WSL command with --exec flag which executes the command in the WSL environment without spawning a new shell.

With above fix I can launch Zed from WSL (Arch) with fish.

@cla-bot
Copy link

cla-bot bot commented Feb 1, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @apedersen00 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 1, 2026
@apedersen00 apedersen00 closed this Feb 1, 2026
@apedersen00 apedersen00 reopened this Feb 1, 2026
@apedersen00
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 1, 2026
@cla-bot
Copy link

cla-bot bot commented Feb 1, 2026

The cla-bot has been summoned, and re-checked this pull request!

@apedersen00 apedersen00 changed the title fix launch wsl proxy Fix launching from WSL with fish as default shell Feb 1, 2026
@apedersen00
Copy link
Contributor Author

Some test commands i ran in PowerShell with and without the --exec flag. I suspect the additional text output without the flag might be what trips up Zed when starting the proxy.

Maybe my fish configuration is weird?

PS C:\Users\andre> wsl.exe --distribution archlinux --cd ~ env echo "hello"
Bye from Zellij!


          .               andreasp@mymachine
         / \
        /   \               Arch Linux x86_64
       /\    \              Linux 6.6.87.1-microsoft-standard-WSL2
      /       \             694 (pacman)
     /         \            fish 4.2.1
    /    .-.    \           Windows Terminal
   /    |   |   _\          WSLg 1.0.66 (Wayland)
  /   _.'   '._   \         3 mins
 /_.-'         '-._\




hello
PS C:\Users\andre> wsl.exe --distribution archlinux --cd ~ --exec env echo "hello"
hello

@Veykril
Copy link
Member

Veykril commented Feb 2, 2026

Yea, your startup scripts are printing which can screw with some commands. On one hand we should --exec here to skip precisely that, on the other hand, that does mean that zed on the remote server will not run with the user's expected environment. Though in practice that should not be a problem given we source the shell in zed after startup which ought to fix that up again.

@Veykril Veykril changed the title Fix launching from WSL with fish as default shell remote: Fix launching from WSL with fish as default shell Feb 2, 2026
@zed-industries-bot
Copy link
Contributor

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 9c67f48

@Veykril Veykril enabled auto-merge (squash) February 2, 2026 08:00
@Veykril Veykril merged commit 782f91f into zed-industries:main Feb 2, 2026
32 checks passed
adb-sh pushed a commit to adb-sh/zed that referenced this pull request Feb 5, 2026
Closes zed-industries#46801

When connecting to WSL2 with fish as the default shell, Zed gets stuck
at "Starting proxy". The connection works fine when bash is the default
shell.

In `start_proxy()`, the WSL command was being invoked with:

```rust
let proxy_process = match wsl_command_impl(&self.connection_options, "env", &proxy_args, false)
```

Changing the last argument to true invokes the WSL command with `--exec`
flag which executes the command in the WSL environment without spawning
a new shell.

With above fix I can launch Zed from WSL (Arch) with fish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Fails to connect to WSL Archlinux

3 participants