Vscode-powershell: Display extension edition & version in PSIC banner

Created on 18 Apr 2020  路  10Comments  路  Source: PowerShell/vscode-powershell

As long as we are displaying this banner:

=====> PowerShell Integrated Console <=====

It would be more useful if it displayed this:

=====> PowerShell Preview Integrated Console v2020.4.2 <=====

or

=====> PowerShell Integrated Console v2020.4.0 <=====

I switch between four different computers and on some I use preview and others I use stable. It would be nice to see which I'm using without having to look through my extensions list. I know, first world problems. :-)

Area-Integrated Console Issue-Enhancement Up-for-Grabs

Most helpful comment

That's the plan. We'll see how it goes. :-)

All 10 comments

I take it you are going to take this on, @rkeithhill ? 馃槉 Would be great to see you contributing again!

That's the plan. We'll see how it goes. :-)

I "think" this might be best addressed in the vscode-powershell repo. The question I suppose is what version info should it display? Version info for the extension or version info for PSES? If we do this on the extension side, it is pretty easy e.g.:

        if (this.sessionSettings.integratedConsole.suppressStartupBanner) {
            this.editorServicesArgs += "-StartupBanner '' ";
        } else {
            const packageJSON: any = require("../../package.json");
            const previewStr = (packageJSON.name.toLowerCase() === "powershell-preview") ? "Preview " : "";
            const version = packageJSON.version;

            const startupBanner = `

            =====> PowerShell ${previewStr}Integrated Console v${version} <=====

            `;

            this.editorServicesArgs += `-StartupBanner "${startupBanner}" `;
        }

If want want to do this on the PSES side, I'm not sure where to get the preview status. The BuildInfo.cs class does have a BuildVersion field but nothing on preview status unless that gets reflected by BuildOrigin when you do a build for publish. Thoughts?

I was thinking this would purely be on the extension side. Just because:

  • Users will see it and they don't know anything about PSES
  • We as maintainers can easily find out which version of PSES is with X version of the extension.

Also I'm pretty sure this.HostVersion gives you the version... and maybe we should have a this.HostName that says PowerShell vs PowerShell Preview

We can probably use this which were this.HostVersion's value originally comes from I believe:
https://github.com/PowerShell/vscode-powershell/blob/master/src/main.ts#L42

I'm gonna transfer this to vscode-powershell.

Any opinion on whether it should be v2020.4.2 or 2020.4.2?

I like it with the v personally :)

Was this page helpful?
0 / 5 - 0 ratings