Multiple Vi replace methods not public

Đang mở
#4,984 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, powershell
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Read Replace.vi.cs around ViReplaceBrace and ReadLine.vi.cs around ViDeleteBrace, then compare those methods with the about_PSR​​eadLine_functions documentation. Determine whether the documented methods should be public and whether their described behavior matches the implementation; done means the API and documentation discrepancy is resolved.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Needs-Triage :mag:
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot
Image
Environment data
PS Version: 7.5.3
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.3.6
PSReadLine EditMode: Vi
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 160
BufferHeight: 42
Steps to reproduce
  1. Open console
  2. Try executing [Microsoft.PowerShell.PSConsoleReadLine]::ViReplaceBrace()
Expected behavior

There appears to be multiple PSConsoleReadline methods listed in MS docs that are not actually public class methods. I'm focusing on ViReplaceBrace which is listed as a function in the MS docs to

Replace all characters between the current brace character and it's matching partner.

I guess there's another issue here, in that if the method was made public similar to #581 it wouldn't perform the way that it is documented. Since ViReplaceBrace calls ViDeleteBrace and that

Find the matching brace, parenthesis, or square bracket and delete all contents within, including the brace.

In vim speak that would be in vs. around.

Actual behavior

It looks like the idea behind Replace.vi.cs is to utilize the respective delete function and then change to Vi insert mode. For a lot of these private methods, that works fine and they could be easily made public to align with MS documentation.

If you'd rather I create a PR for MS docs repo to remove these private methods from the list of PSReadline functions, that works too.

Ngôn ngữ chính
C#
Star
4.4k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSReadLine

Tất cả issue của PowerShell/PSReadLine

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.