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 background:
I'm trying to migrate into using VSCode for powershell editing instead of the ISE since VSCode is the future. We're having issues with migrating some workflows (specifically signing scripts). In the ISE, I have created a function that uses the $psise.currentfile.fullpath so that we can easily sign the file that's open in the ISE. I'd like to recreate this for vscode, but I'm not finding any way to determine what the open file is. We tend to run this interactively (i.e. we're testing in the ISE, get it to where we want to test on another box, and sign it by just typing Set-CoSAuthenticodeSignature, which is a custom function that wraps set-authenticodesignature but has defaults set and automatically finds the file, if we don't specify), so we don't want to have to type the path name all the time, especially since we don't have to now.
Thanks!