Files
l0ng-ai dc7736ded8 fix(terminal): complete WSL panes over the distro's \\wsl$ share
Tab in a WSL bash pane always fell through to the shell: the pane's
filesystem is foreign, so the completion engine had no cwd to list and
handed every Tab back to bash. Now a WSL pane's POSIX cwd (OSC 7) is
translated to the distro's \\wsl$ share, which this process can read
like any directory:

- complete_foreign lists paths against the share but keeps everything
  that would consult this machine switched off: no PATH binaries in the
  command position, no generator scripts, and `~` is left to the shell
  (it names the distro's home, not this machine's).
- Absolute words stay inside the share: Windows join semantics keep the
  UNC prefix when a rooted word lands on it, so `ls /etc<Tab>` lists the
  distro's /etc, not C:\etc. The automount stays on the share for the
  same reason.
- A wsl.exe pane spawned without --distribution now resolves the default
  distro from the registry (Lxss\DefaultDistribution), so its remote
  context names a real distro instead of an empty placeholder.
- A WSL workspace no longer claims the SSH remote-listing path; only a
  spec-carrying workspace does.

Verified end to end against a live Ubuntu-24.04 through an isolated
daemon: the default distro resolves, cwd frames flow on cd, and the
translated share lists from the Windows side.
2026-08-08 14:46:42 +08:00
..