Skip to content

Treat unbound command parameters as command arguments#2919

Merged
lzybkr merged 2 commits into
PowerShell:masterfrom
AndrewGaspar:exe_param_tab_fix
Feb 14, 2017
Merged

Treat unbound command parameters as command arguments#2919
lzybkr merged 2 commits into
PowerShell:masterfrom
AndrewGaspar:exe_param_tab_fix

Conversation

@AndrewGaspar
Copy link
Copy Markdown
Contributor

This addresses some of the problems reported in Issue #2912. It fixes native tab completion for tokens that begin with a single "Dash" (defined by CharTraits.IsDash), but it does not fix native tab completion for the '--' token.

@msftclas
Copy link
Copy Markdown

Hi @AndrewGaspar, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Andrew Gaspar). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

Copy link
Copy Markdown
Contributor

@lzybkr lzybkr left a comment

Choose a reason for hiding this comment

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

The code change looks good - it even fixes a corner case of completing filenames that start with a -.

Can you add a test in test\powershell\Language\Parser\ExtensibleCompletion.Tests.ps1?

@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Dec 22, 2016
@AndrewGaspar
Copy link
Copy Markdown
Contributor Author

Was having issues running the tests - finally figured out it was because I didn't sync the submodules. Should have read the README more carefully. :)

@AndrewGaspar
Copy link
Copy Markdown
Contributor Author

Pretty sure this is an infrastructure failure. Can we re-run?

Copy link
Copy Markdown
Collaborator

@powercode powercode left a comment

Choose a reason for hiding this comment

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

I think we should take a stab at fixing double dash '--' at the same time.
Also common in native commands.

https://github.com/powercode/PowerShell/commits/native-arg-hyphen seems to work, but I haven't tested it properly.

@lzybkr
Copy link
Copy Markdown
Contributor

lzybkr commented Jan 26, 2017

@powercode - these changes seem fine to me and I see no reason to not merge. If you want to fix double hypen in another PR, that would be great.

@AndrewGaspar
Copy link
Copy Markdown
Contributor Author

Let's just merge and close the PR. Double hyphen can be done another time.

@lzybkr lzybkr merged commit ca5fc9c into PowerShell:master Feb 14, 2017
@AndrewGaspar AndrewGaspar deleted the exe_param_tab_fix branch February 14, 2017 00:09
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants