Skip to content

__fish_update_cwd_osc doesn't work for WezTerm in MSYS2 #11981

@Dieken

Description

@Dieken
  • msys/fish, version 4.1.2-1 (Built by MSYS2 project)
  • ucrt64/mingw-w64-ucrt-x86_64-wezterm 20240812-215703-30345b36 (installed with pacman in MSYS2)
  • Windows 11 24H2 (OS internal version 26100.6899)

https://github.com/fish-shell/fish-shell/blob/4.1.2/share/functions/__fish_config_interactive.fish#L183

This line doesn't work, I need to configure c:/msys64/home/xxx/.config/fish/config.fish:

if status is-interactive
    function __fish_update_cwd_osc --description 'Notify terminals when $PWD changes' --on-variable PWD
        # use an empty string for path,  "e\]7\;file:// / \a"  and "e\]7\;file:// Pt / Pt\a"
        # also work (notice it's literal "Pt"), no idea why.
        printf \e\]7\;\a
    end
end

My WezTerm configuration at c:/Users/xxx/.wezterm.lua:

local wezterm = require 'wezterm'

local config = wezterm.config_builder()

config.default_prog = {
     'C:\\msys64\\msys2_shell.cmd',
    '-ucrt64',
    '-defterm',
    '-here',
    '-no-start',
    '-shell', 'fish'
}

config.default_cwd = 'C:\\msys64\\home\\xxx'

return config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions