PowerShell / PowerShell/vscode-powershell

Alias expansion should move cursor to end of command name

オープン
#5,136 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Issue-Bug Up for Grabs
主要言語
TypeScript
スター
1.9k
フォーク
548
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず拡張機能内で alias 展開コマンドとその Alt+Shift+E キーバインドを見つけ、次に cd| で動作を再現します。alias の展開によってカーソルが完全なコマンド名の後ろに置かれ、空白に関する動作が実装またはテストによって解決されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell, typescript, vscode
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。