Skip to content

Support $env:EDITOR being a .bat/.cmd script on Windows #1882

@chwarr

Description

@chwarr

Describe the feature or problem you'd like to solve

I would like to use an external editor via Ctrl-G. My external editor is opened via a wrapper Batch script

Proposed solution

Support external editors that are started via Batch (.bat/.cmd) scripts on Windows.

Example prompts or workflows

$env:EDITOR='my-editor.cmd'
copilot
# When Copilot launches, press Ctrl-G to edit the prompt in the external editor

Additional context

Today, GitHub Copilot CLI does not support your external editor being a Batch (.bat/.cmd) script. If your $env:EDITOR is something like "my-editor.cmd", pressing Ctrl-G fails with "Error: spawn EINVAL".

If $env:EDITOR is an executable, it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions