question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add tests for TabCompletion for various input types

See original GitHub issue

Add tests for TabCompletion for various input types

Related code coverage report:

https://codecov.io/gh/PowerShell/PowerShell/tree/9e41c647a9407e05d86f4971a6bd25719a7130d0/src/System.Management.Automation/engine/CommandCompletion

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.3
OS                             Microsoft Windows 10.0.16204
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
daxian-dbwcommented, Sep 7, 2017

Summary of missing areas

CommandCompletion.cs

  • negatives cases/error handling (if some of these can’t be hit, consider converting to asserts)
  • in debugger
  • nested runspace/remote runspace
  • getting next result including wrap around
  • user overridden tabexpansion
  • legacy tabexpansion
  • remove PSv2 code PSv2CompletionCompleter is for tab completion in a remote session that is from win8+ to win7, so it needs to be kept.
  • adding/handling quotes

CompletionAnalysis.cs

  • cursor position (you have some of these covered, not sure if all)
  • filename after redirection
  • line continuation
  • DSC resource
  • Cursor on special tokens, like comma and minus
  • using module <module-name/file-completion>
  • Enum property value of DSC Resource

CompletionCompleters.cs

  • fully qualified cmdlet
  • remove workflow code
  • complete module name
  • import-dscresource
  • positional parameter

CompletionResult.cs

  • s_nullInstance
  • Exceptions

ExtensibleCompletion.cs

  • Exceptions
  • Register-ArgumentCompleter with CommandName = [string]::empty

PseudoParameterBinder.cs

  • remove workflow related code
  • examine the code to see to find out specific missing areas
0reactions
SteveL-MSFTcommented, Oct 12, 2017

I think the remaining items can be pushed to MQ

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom bash tab completion showing possible ...
Before adding each possible completion, I do a quick check to see if the completion starts with the word that was typed originally....
Read more >
bash and readline: tab completion in a user input loop?
Passes all unit and reg tests, and shows this output from your script when run using the patched bash, as you expected:
Read more >
Tab completion behavior for click.File and click.Path types
Filename and directory completion has different behavior ... to adjust the existing ones and add some additional test cases for Path types.
Read more >
Add Custom Tab Completion to Any Bash Script ... - YouTube
1. Bash Really is the Best First Language 2. Create a New Script in Your Scripts Directory 3. Find Programmable Completion in the...
Read more >
Bash TAB completion tutorial (GNU Astronomy Utilities)
1 Bash TAB completion tutorial. When a user presses the [TAB] key while typing commands, Bash will inspect the input to find a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found