PowerShell / PowerShell/PowerShell-RFC
Get-ChildItem IncludeRoot Parameter
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- PowerShell
- Star
- 467
- Fork
- 140
- Merge trung bình
- 9 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với nội dung RFC và các ví dụ được liên kết để hiểu workflow Get-ChildItem được yêu cầu. Xem lại hành vi hiện tại của -Recurse, cùng với tham số IncludeRoot và đầu ra được đề xuất. Được xem là hoàn tất khi tham số, ví dụ sử dụng, đầu ra và các cân nhắc thiết kế của RFC được giải quyết đủ rõ ràng để triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100