Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell tab completion doesn't work for Write cmdlets when variable is in quotes #885

Closed
ramya-rao-a opened this issue Jun 15, 2017 · 6 comments
Labels

Comments

@ramya-rao-a
Copy link

From @powershellpr0mpt on June 15, 2017 12:47

  • VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author Version
PowerShell ms-vscode 1.3.2

Steps to Reproduce:

  1. Create a variable with
  2. Type any of the PowerShell Write-cmdlets [Write-Output/Host/Warning/Error] and open quotes "
  3. Type $ to reference a variable and try tab completion.

Expected behaviour is VSCode simply providing a list of available variable, similar to when no quotes are used.

See attached .gif for easily reproduced example
vscode_write_variable

Reproduction Code:

$test = 1
Write-Output "$t

and try tab completing the variable

Copied from original issue: microsoft/vscode#28814

@rkeithhill
Copy link
Contributor

Indeed this does work from the command line so I'm a bit surprised it doesn't work in VSCode since we rely on the PowerShell engine's completion functionality.

@mattmcnabb
Copy link
Contributor

Wanted to point out that this doesn't appear to be an issue with the Write-* cmdlets, but simply the way intellisense works in the editor when a variable is inside double-quotes. For instance, you can repro this with Get-Process just like above.

I've always noticed this but simply chalked it up to the Intellisense behavior and learned to use Ctrl+Space to complete values inside quotes. It works just fine in the Integrated Terminal.

@mattmcnabb
Copy link
Contributor

Another way of saying it: Intellisense is not automatically invoked inside quotes - you have to manually invoke it.

@powershellpr0mpt
Copy link

Just started working with VSCode instead of ISESteroids, so was something I had noticed.
Thought it was simply related to Write-* cmdlets only, but would think it's even worse when it's for all of them.

@PrateekKumarSingh
Copy link

Observing the same issue.

@SydneyhSmith
Copy link
Collaborator

Closing as a dupe of #1309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants