`dotnet-suggest list` truncates dotted global tool names
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Bắt đầu với FileEnumerator.EnumerateFilesWithoutExtension trong FileEnumerator.cs và SuggestionDispatcher.ShellPrefixesToMatch trong SuggestionDispatcher.cs; theo dõi cách mỗi phần xử lý tên tệp thực thi Linux và kiểm tra các bài kiểm thử liên quan. Chạy các bài kiểm thử phù hợp, sau đó xác minh rằng dotnet-suggest list giữ nguyên tên đầy đủ có dấu chấm của các công cụ để shim PowerShell có thể đăng ký bộ hoàn tất cho chúng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The tool names below are anonymized. They retain the same number of dotted segments as the original names.
Environment
- OS: Linux
dotnet-suggest: 3.0.0- Shell: PowerShell
Steps to reproduce
- Install a .NET global tool with a dotted command name, for example
Example.Tools.StatusMonitor.Console. - Verify that
dotnet tool list -gshows the full name in the Commands column. - Run
dotnet-suggest list.
Expected behavior
The list contains Example.Tools.StatusMonitor.Console, so the PowerShell shim can register a completer for the full command name.
Actual behavior
The list shows Example.Tools. A second tool, SampleUi.Automation.TestClient, appears as SampleUi.
Tab completion for the full name fails with the standard PowerShell shim. Passing the full executable path directly returns the expected options:
$name = 'Example.Tools.StatusMonitor.Console'
$exe = (Get-Command $name -CommandType Application).Source
$line = "$name --"
dotnet-suggest get -e $exe --position $line.Length -- $line
Explicitly registering the full name with Register-ArgumentCompleter -Native restores tab completion.
Likely cause
In v3.0.0, global-tool discovery calls Path.GetFileNameWithoutExtension in FileEnumerator.EnumerateFilesWithoutExtension, removing .Console from the Linux executable name. SuggestionDispatcher.ShellPrefixesToMatch calls the same method again when producing list output, removing .StatusMonitor. The PowerShell shim uses the resulting name to register the completer.
- FileEnumerator.cs in v3.0.0
- SuggestionDispatcher.cs in v3.0.0
- Related app-side registration issue #2316
Background
We use the same name for a C# project, its assembly, and its installed command. This makes it easier to trace a command in a deployment script or log back to the project that builds it. Our project names follow the dotted naming convention we use across our C# codebase, so preserving the dots in the command name is important to us.
- Ngôn ngữ chính
- C#
- Star
- 3.7k
- Fork
- 439
- Merge trung bình
- 4 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/command-line-api
-
German localization is incompleteCó thể đã có người làm @b-v-d-e-v đã nhận 43 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2852 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translatedCó thể đã có người làm @JPBlanc đã nhận 141 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/command-line-api#2822 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2792 · 2 bình luận · 17 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
`Argument.Arity` modify internal state on first get access.Có thể đã có người làm @zjdangge đã nhận 27 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dotnet/command-line-api#2704 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
GetCompletions should check exit code of invoked applicationCó thể đã có người làm @baradgur đã nhận 1312 ngày trước. Đang mởArea-Completions bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dotnet/command-line-api#2137 · 1 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của dotnet/command-line-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
area:repo elsa 3 prio low triaged type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-core#9258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
iokode/OpinionatedFramework#140 ·
-
accessibility effort: small enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pedersebastian/CustomBossChallenge#185 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100