PowerShell / PowerShell/vscode-powershell
Feature Request: Call VSCode commands from $psEditor variable
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 1.9k
- フォーク
- 548
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
It would be really cool if a PowerShell script were able to invoke VSCode commands, effectively automating the IDE from PowerShell. This could be exposed via the built-in $psEditor variable that's accessible in the VSCode-PowerShell environment.
Related to #773, but more broad.
If there's already a way to do this, I'd love to hear it. I've explored the Workspace and Window variables on the $psEditor object, along with the GetEditorContext() method output, and can't find any way to do this right now.
PS /Users/tsulli> $psEditor |gm
TypeName: Microsoft.PowerShell.EditorServices.Extensions.EditorObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetEditorContext Method Microsoft.PowerShell.EditorServices.Extensions.EditorContext GetEditorContext()
GetHashCode Method int GetHashCode()
GetType Method type GetType()
RegisterCommand Method bool RegisterCommand(Microsoft.PowerShell.EditorServices.Extensions.EditorCommand editorCommand)
ToString Method string ToString()
UnregisterCommand Method void UnregisterCommand(string commandName)
EditorServicesVersion Property version EditorServicesVersion {get;}
Window Property Microsoft.PowerShell.EditorServices.Extensions.EditorWindow Window {get;}
Workspace Property Microsoft.PowerShell.EditorServices.Extensions.EditorWorkspace Workspace {get;}
Cheers,
Trevor Sullivan
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、組み込みの $psEditor EditorObject API、特にその Workspace、Window、GetEditorContext()、RegisterCommand()、UnregisterCommand() メンバーを確認し、より広範なリクエストを関連する issue #773 と比較します。VSCode-PowerShell 環境の PowerShell スクリプトから $psEditor を介して VSCode コマンドを呼び出せるようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell, typescript, vscode
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100