Vscode-powershell: PowerShell tab completion doesn't work for Write cmdlets when variable is in quotes

Created on 15 Jun 2017  路  6Comments  路  Source: PowerShell/vscode-powershell

_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_

Area-IntelliSense Issue-Bug

All 6 comments

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.

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.

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

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.

Observing the same issue.

Closing as a dupe of #1309

Was this page helpful?
0 / 5 - 0 ratings

Related issues

guidooliveira picture guidooliveira  路  3Comments

rkeithhill picture rkeithhill  路  3Comments

lukegriffith picture lukegriffith  路  3Comments

pcgeek86 picture pcgeek86  路  4Comments

AWahlqvist picture AWahlqvist  路  3Comments