Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Intellisense fails to resolve Dynamic parameters cmdlets when -Path or -LiteralPath is a quoted path like "c:\" #9983

Copy link
Copy link
@ViperTG

Description

@ViperTG
Issue body actions

When trying to tab through the parameters of Get-ChildItem it does not suggest most of the switches and also skips the Attributes parameter if the Path parameter contains the character : which it pretty common for paths.

It only occurs when the : is written as a string in the command line, so using a variable that has the path with the : in it works fine, also any path written without : like \.

If you type the fist letter of the parameter then is suggests it correctly, like -D[tab] will complete to -Directory as expected, but it should still suggest them when tabbing through the parameters.

This has negative effects in editors like VSCode also since it is PowerShell that is reporting the completion data to the editor i believe.

I see this error on all version of PowerShell I have available, 5.1, 6.21 and 7.0.0 Preview 1

  • When Path contains ":"
    Get-ChildItem-bug1
  • When Path does not contain ":"
    Get-ChildItem-bug2

Parameters that it fails to suggest:

  • Attributes
  • FollowSymlink
  • Directory
  • File
  • Hidden
  • ReadOnly
  • System

Steps to reproduce

Get-ChildItem -Path "c:\" -[tab][tab][tab][tab]...

Expected behavior

Get-ChildItem -Path "c:\" -Directory

Actual behavior

Get-ChildItem -Path "c:\" -Depth

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.1
PSEdition                      Core
GitCommitId                    7.0.0-preview.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Reactions are currently unavailable

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.