PowerShell / PowerShell/PowerShellEditorServices

Add new commands for Find\Install Editor Commands

オープン
#644 コメント 13 件 リアクション 1 件 担当者 0 名 GitHub で見る

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

Area-psEditor Issue-Discussion
主要言語
C#
スター
767
フォーク
266
平均マージ
3日 16時間
マージ済み PR(30日)
1

説明

I want to add some new commands that should make discovering and installing new Editor Commands or modules with them easier. One of the easiest ways we could do this is by writing wrappers around Find-Module and Install-Module. Just change it to only find modules with a particular tag or set of tags.

Editor Commands are a great feature of PSES, but they don't get a lot of attention and are often overlooked. I think if we put some effort into making them easier to use, easier to find, and easier to share, we would start to see more adoption.

Things that I was wanting to discuss and get community feedback on:

What Tag or Tags would be best?

Ex: EditorCommand, EditorCommands, PSES?

What is the best user experience?

In the short term, I could create Editor Command\Commands for Find-EditorCommand and Install-EditorCommand that would tie into the Show Additional Command menu and use the command palette to prompt for user input and prompt users with lists of found modules. Maybe something where it is an Editor Command to Install Editor Commands, and it prompts for a name, displays results in command palette, and then installs the module the user selects in the command palette. However, that really should be just for the short term

Ideally, it is better to have this at the root level. Long term, I think it would be best if this could tie in with an actual GUI and allow users a similar experience to installing extensions. I have not kept up with how far they have come with their webview features, but maybe that could be an option. I also don't know what aspects would be PSES and what would be VSCode Extension.

FInd-Module and listing Editor Commands in the module

It is one thing to list modules with Editor Commands inside, but could we also figure out a way to show what Editor Commands are inside the module and have those get returned by Find-Module? I have not really played around with the metadata enough to know if you can add custom fields and those get passed back. The other issue would be how would you educate people on how to do this.

Is there a standard for importing Editor Commands?

When I first worked with @daviwil on this 2+ years ago, the idea was to conditionally load these by checking for the $psEditor variable. If the module was imported and it was running inside of Code, then it would auto register the Editor Commands. I know @SeeminglyScience uses another method, but I haven't looked into it enough to see what he's doing.

This could be something that could eventually be controlled by a GUI or config, but I am not sure how that will end in the long run. I think the majority of people stick to the defaults and never really go in and tweak the configs of editors, and it could lead to less adoption. Maybe have autoload as the default, and allow for override via config of GUI as an option.

Why now?

I think now is a great time to start pushing and making an effort to get people using Editor Commands. I tried early on, and it was really bad timing. David was pushing hard to get the integrated terminal working, and when he finally did, it pretty much set Editor Commands back a long way. I had to stop pushing people to them due to the Integrated terminal breaking their integration with the command palette. It didn't make sense for David to invest time into them when he was devoting most of his time to fixing bugs and improving performance. I decided to stop trying to push them to people, and to let things settle.

At that point, we were still struggling to get people to switch to code. Now, I think we have great adoption and people are starting to get used to the normal features, so now should be a great time to really improve these and get some traction.

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

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

はじめの一歩

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

調査の方向性

まず、既存の Editor Commands サポートと、PowerShell Find-Module および Install-Module をそこに接続する方法を確認します。この issue では、タグ、ユーザーエクスペリエンス、メタデータ、インポート動作、そして PSES と VS Code のどちらが担当するかが未決定のままです。完了とするには、具体的なファイルやテストを特定する前に、合意されたスコープと実装計画が必要です。

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

評価

技術スタック
powershell, vscode
領域
developer-experience, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

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

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