Skip to content

Add shell integration injection for command prompt #244638

Closed
@Tyriar

Description

@Tyriar

It's relatively easy to get most of the way there with an injected profile:

Create a .cmd file:

@echo off
PROMPT $e]133;D$e\$e]133;A$e\$e]9;9;$P$e\$P$G$e]133;B$e\

Create a custom profile:

    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [
        "/K",
        "C:\\Users\\Daniel\\shellIntegation.cmd",
      ],
      "icon": "terminal-cmd"
    },

This gets us here:

Image

To get the items to light up there are two approaches:

  • See if we have a hook to be about to clear %errorlevel% which seems to contain error status for cmd. If so, use that as the exit code in the D sequence.
  • If that's not possible, we can create a sequence that says to treat the D sequence without an exit code as a full command.

Metadata

Metadata

Labels

*out-of-scopePosted issue is not in scope of VS Codefeature-requestRequest for new features or functionalityterminal-shell-cmdAn issue in the terminal specific to command prompt on Windows

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions