FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Enable tab completion for variable assignment that is enum by SteveL-MSFT · Pull Request #10646 · PowerShell/PowerShell · GitHub

Enable tab completion for variable assignment that is enum - #10646

Merged
Dongbo Wang (daxian-dbw) merged 12 commits into
PowerShell:masterfrom
SteveL-MSFT:enum-completer
Oct 14, 2019
Merged

Enable tab completion for variable assignment that is enum#10646
Dongbo Wang (daxian-dbw) merged 12 commits into
PowerShell:masterfrom
SteveL-MSFT:enum-completer

Conversation

Steve Lee (SteveL-MSFT) commented Sep 29, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

Add code to CompletionAnalysis class to detect if completion is for variable assignment and the variable is an enum. Then use helper GetResultForEnum() to return appropriate results matching string to complete. Enum strings are always quoted and will match initial single or double quote. Needed to have similar code in 3 places to handle:

$ErrorActionPreference = <tab>
$ErrorActionPreference = '<tab> # in this case, it's a string completion
$ErrorActionPreference=<tab>

Although it's not in this gif, the results are sorted by enum name alphabetically.

PR Context

Fix #10631

PR Checklist

Copy link
Copy Markdown
Member Author

PoshChan-Bot (@PoshChan) please retry windows

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT), successfully started retry of PowerShell-CI-Windows

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 5, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Oct 5, 2019

Rob Holt (rjmholt) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Oct 8, 2019
ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 10, 2019
ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 10, 2019
Dongbo Wang (daxian-dbw) merged commit 0842fe8 into PowerShell:master Oct 14, 2019
Steve Lee (SteveL-MSFT) deleted the enum-completer branch October 14, 2019 16:55

Copy link
Copy Markdown

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

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Enable tab completion for variables that are of enum type

6 participants


Back | FazBrowse Home | New Git URL