Visual Studio Code $psise equivalent

前端 未结 1 1711
梦谈多话
梦谈多话 2021-01-04 11:47

I\'m looking for a way to replicate the $psISE functionality in VSCode, at least as far as discovering the filename of the open, active file in the editor.

As backgr

1条回答
  •  攒了一身酷
    2021-01-04 12:23

    I think it's not implemented yet (the $psise). You can file an issue on the vscode-powershell Project for VSCode. A similar one has already been filed.

    At least you might use something like $context = [Microsoft.Powershell.EditorServices.Extensions.EditorContext]$psEditor.GetEditorContext()

    Then you can access the current file... $context.CurrentFile.

    See also this video for an introduction...

    0 讨论(0)
提交回复
热议问题