`dotnet-suggest list` truncates dotted global tool names
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza con FileEnumerator.EnumerateFilesWithoutExtension en FileEnumerator.cs y SuggestionDispatcher.ShellPrefixesToMatch en SuggestionDispatcher.cs; sigue cómo gestiona cada uno los nombres de ejecutables de Linux y comprueba las pruebas relacionadas. Ejecuta las pruebas pertinentes y, después, verifica que dotnet-suggest list conserva los nombres completos de las herramientas con puntos para que el shim de PowerShell pueda registrar completadores para ellas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 3.7k
- Forks
- 439
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/command-line-api
-
German localization is incompletePosiblemente ocupada @b-v-d-e-v la tomó hace 43 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dotnet/command-line-api#2852 ·
Los mantenedores suelen responder en 3 días
-
Incomplete French (fr) translation: RequiredOptionWasNotProvided not translatedPosiblemente ocupada @JPBlanc la tomó hace 141 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
dotnet/command-line-api#2822 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dotnet/command-line-api#2792 · 2 comentarios · 17 reacciones ·
Los mantenedores suelen responder en 3 días
-
`Argument.Arity` modify internal state on first get access.Posiblemente ocupada @zjdangge la tomó hace 27 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dotnet/command-line-api#2704 ·
Los mantenedores suelen responder en 3 días
-
GetCompletions should check exit code of invoked applicationPosiblemente ocupada @baradgur la tomó hace 1312 días. AbiertoArea-Completions bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/command-line-api#2137 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 3 días
Todos los issues de dotnet/command-line-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
iokode/OpinionatedFramework#140 ·
-
accessibility effort: small enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pedersebastian/CustomBossChallenge#185 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
JiaFeiMiao-K-Cat/DiscImageStudio#331 ·
Los mantenedores suelen responder en 1 día
-
[Tool] NtildeAbiertohas-image has-license has-readme new-tool ready-to-approve repo-verified
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
shanselman/TinyToolTown#918 ·
Los mantenedores suelen responder en 1 día