github / github/copilot-cli

Copilot always tries unix command before PowerShell

Offen
#689 0 Kommentare 9 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:platform-windows area:tools
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the bug

I'm running copilot-cli on Windows in PowerShell.
I have the following in my `custom-instructions.md` file:

```markdown
- Assume that you are running in a Windows environment.
- Any shell or terminal commands/syntax should be PowerShell native commands and any paths should use Windows-style backslashes.
- DO NOT use Unix/Linux-style commands or paths unless explicitly instructed otherwise.
```

However, copilot almost always tries to use Unix/Linux shell commands like grep, head, wc, etc, before trying PowerShell.

Example:

> ✔ List build errors by file
> $ dotnet build --nologo --tl:off 2>&1 | grep "\.cs(" | head -20
> └ 7 lines...
>
> ✔ List build errors by file
> $ dotnet build --nologo --tl:off 2>&1 | Select-String "\.cs\(" | Select-Object -First 20
>

### Affected version

0.0.365

### Steps to reproduce the behavior

_No response_

### Expected behavior

Copilot CLI understanding that it is running in a Windows PowerShell environment and using PowerShell command instead of Unix/Linux style commands

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.