PowerShell / PowerShell/PowerShell-RFC

Get-ChildItem IncludeRoot Parameter

オープン
#244 コメント 2 件 リアクション 3 件 担当者 0 名 GitHub で見る

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

主要言語
PowerShell
スター
467
フォーク
140
平均マージ
9分
マージ済み PR(30日)
1

説明


RFC:
Author: John Bevan
Status: Draft
SupercededBy:
Version:
Area: Standard Functions
Comments Due:
Plan to implement:

Get-ChildItem; Add IncludeRoot Switch

Suggestion: Currently if you wish to fetch an item and its children you have to make a call to Get-Item and Get-ChildItem. Since this is a common use case, it would be good to reduce this to a single call. By adding an IncludeRoot switch to Get-ChildItem we could easily have it fulfill this requirement.

Here are some examples of people who've hit this scenario & tried to get creative in resolving it.

Motivation

As a PowerShell user,
I can retrieve an item and its children,
so that I have the full tree returned in a single result set.

User Experience

Example of user experience with example code/script.
Include example of input and output.

Get-ChildItem -Path 'c:\demo' -IncludeRoot -Recurse | Select-Object -ExpandProperty FullName
c:\demo
c:\demo\subfolder
c:\demo\subfolder\one.txt
c:\demo\subfolder\two.txt

Specification

Include [Parameter()][Switch]$IncludeRoot in the list of available parameters.

Alternate Proposals and Considerations

The current workaround is to make separate calls to Get-Item and Get-ChildItem.

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

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

はじめの一歩

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

調査の方向性

RFC の本文とリンクされた例から始めて、要求された Get-ChildItem ワークフローを理解してください。現在の -Recurse の動作と、提案されている IncludeRoot パラメーターおよび出力を確認してください。RFC のパラメーター、使用例、出力、設計上の考慮事項が、実装に進める程度に十分解決されていれば完了です。

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

評価

技術スタック
powershell
領域
cli
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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