zsh autocompletions script emits invalid option switches
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Describe the bug
The zsh autocompletions script obtained from `dotnet completions script zsh` emits invalid option switches that contain slashes (e.g. `/v`), causing completions to fail and an error to fire for all attempted subcommand path completions.
### Steps to reproduce
In a new zsh session, run:
```shell
autoload -Uz compinit; compinit; eval "$(dotnet completions script zsh)"
```
Type the following and press TAB:
```shell
dotnet build ..
```
### Expected behavior
Path autocompletions should function properly and should not print an error to the command line.
### Actual behavior
The path completion fails, and the following error is printed to the command line:
```
_arguments:comparguments:327: invalid argument: /v=[Set the MSBuild verbosity level. Allowed values are q\[uiet\], m\[inimal\], n\[ormal\], d\[etailed\], and diag\[nostic\].]:LEVEL:((d\:"d" detailed\:"detailed" diag\:"diag" diagnostic\:"diagnostic" m\:"m" minimal\:"minimal" n\:"n" normal\:"normal" q\:"q" quiet\:"quiet" ))
```
### Is this a regression?
Same behavior on version 10.0.109, so not that I am aware of.
### Are there any workarounds?
None I know currently. I will update this issue when I find one.
### dotnet --info output
```console
.NET SDK:
Version: 10.0.302
Commit: 35b593bebf
Workload version: 10.0.300-manifests.1641d827
MSBuild version: 18.6.11+35b593beb
Runtime Environment:
OS Name: fedora
OS Version: 44
OS Platform: Linux
RID: linux-x64
Base Path: /home/may/.dotnet/sdk/10.0.302/
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.10
Architecture: x64
Commit: f7d90799ce
.NET SDKs installed:
10.0.302 [/home/may/.dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.10 [/home/may/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.10 [/home/may/.dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
```
### IDE version
_No response_
### Other details
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.