8000 Change TabExpansion2 to not require `-CursorColumn` and treat as `$InputScript.Length` by SteveL-MSFT · Pull Request #10849 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Oct 20, 2019

PR Summary

Testing tab completion and using TabExpansion2 is annoying as most of the time you have the -CursorColumn parameter set as $inputScript.Length. This change removes -CursorColumn as a mandatory parameter and if not provided assumes it is $InputScript.Length.

PR Checklist

@SteveL-MSFT SteveL-MSFT changed the title FEATURE: Change TabExpansion2 to not require -CursorColumn and treat as $InputScript.Length Change TabExpansion2 to not require -CursorColumn and treat as $InputScript.Length Oct 27, 2019
param($path, $parameter, $expected)
$script = "new-item wsman:\$path $parameter"
$res = TabExpansion2 -inputScript $script -cursorColumn $script.Length
$res = TabExpansion2 -inputScript $script
Copy link
Collaborator

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

Copy link
Member Author

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

@daxian-dbw daxian-dbw added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log AutoMerge informs the bot to automerge the PR labels Oct 30, 2019
@ghost
Copy link
ghost commented Oct 30, 2019

Hello @daxian-dbw!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit f48a28e into PowerShell:master Oct 30, 2019
@ghost
Copy link
ghost commented Nov 21, 2019

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

@SteveL-MSFT SteveL-MSFT deleted the tabexpansion2 branch June 6, 2020 02:29
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoMerge informs the bot to automerge the PR CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0