PowerShell / PowerShell/vscode-powershell

Alias expansion should move cursor to end of command name

Aperta
#5,136 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Issue-Bug Up for Grabs
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia individuando il comando di espansione degli alias e la relativa combinazione di tasti Alt+Shift+E nell’estensione, quindi riproduci il comportamento con cd|. Il lavoro è completato quando l’espansione dell’alias posiziona il cursore dopo il nome completo del comando e qualsiasi comportamento relativo agli spazi è risolto dall’implementazione o dai test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
devtools
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.