PowerShell / PowerShell/vscode-powershell
Alias expansion should move cursor to end of command name
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 548
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
After typing an alias, if you press Alt + Shift + E to replace it with the full command name, the cursor remains at the original position. It should be moved to the end of the command so you can continue typing.
For example (| denotes the cursor):
cd| > Press expansion shortcut > Se|t-Location
I cannot think of a use case where leaving the cursor in the middle of the command name would be desirable. In fact, inserting a space after the command name (if there isn't already) may be desirable too.
PowerShell Version
PowerShell 7.4.7
Ubuntu 24.04.1 LTS
Visual Studio Code Version
1.96.4
Extension Version
ms-vscode.powershell@2025.0.0
Steps to Reproduce
| denotes the cursor:
cd| > Press alias expansion shortcut Alt + Shift + E > Se|t-Location
Expected:
Set-Location|
Perhaps also insert space after command name, if there isn't one already
Visuals
No response
Logs
No response
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.
Línea de trabajo
Comienza localizando el comando de expansión de alias y su combinación de teclas Alt+Shift+E en la extensión; después, reproduce el comportamiento con cd|. Se considera terminado cuando la expansión del alias coloca el cursor después del nombre completo del comando, y cualquier comportamiento relacionado con los espacios queda resuelto por la implementación o las pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell, typescript, vscode
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100