-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Change TabExpansion2 to not require -CursorColumn and treat as $InputScript.Length
#10849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t as `$InputScript.Length`
-CursorColumn and treat as $InputScript.Length-CursorColumn and treat as $InputScript.Length
| param($path, $parameter, $expected) | ||
| $script = "new-item wsman:\$path $parameter" | ||
| $res = TabExpansion2 -inputScript $script -cursorColumn $script.Length | ||
| $res = TabExpansion2 -inputScript $script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still have a test where the parameter is used? Ideally the number of cases we test monotonically increases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjmholt the rest of this script uses the parameter
|
Hello @daxian-dbw! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
🎉 Handy links: |
PR Summary
Testing tab completion and using
TabExpansion2is annoying as most of the time you have the-CursorColumnparameter set as$inputScript.Length. This change removes-CursorColumnas a mandatory parameter and if not provided assumes it is$InputScript.Length.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.