Multiple Vi replace methods not public
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, powershell
- Domain
- cli, documentation
Research direction
Read Replace.vi.cs around ViReplaceBrace and ReadLine.vi.cs around ViDeleteBrace, then compare those methods with the about_PSReadLine_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.
Written by the indexing model from the issue text.
Description
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
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
- Open console
- 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.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSReadLine
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSReadLine#5205 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PowerShell/PSReadLine#5195 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PowerShell/PSReadLine#5121 ·
-
Needs-Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PowerShell/PSReadLine#5045 ·
-
Area-CommandHelp Issue-Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 68/100
PowerShell/PSReadLine#3470 · 3 reactions ·
All issues in PowerShell/PSReadLine
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100