Show what experimental features are turned on at the start of interactive sessions
See original GitHub issueSummary of the new feature/enhancement
For an interactive PowerShell user it is important to know if and what experimental features are currently enabled - if any.
-
In a stable / LTS version, the expectation may be that NONE are enabled, so if any are, it’s helpful to be notified.
- Experimental features may inadvertently be enabled, namely if, in a previously installed or side-by-side preview version features were ever selectively enabled or disabled with
-Scope CurrentUser
- which is the default scope. The resulting"$(Split-Path $PROFILE.CurrentUserAllHosts)/powershell.config.json"
file takes effect for all installed versions, and overrides"PSHOME/powershell.config.json"
- Experimental features may inadvertently be enabled, namely if, in a previously installed or side-by-side preview version features were ever selectively enabled or disabled with
-
In preview versions - which by default come with all experimental features enabled - it is additionally important to know which ones are not enabled in a given session, since, after using selective disabling, newly introduced features may end up DISABLED in preview versions installed later (as explained above).
- Additionally, showing in effect all experimental features helps with discovering new ones.
Proposed technical implementation details (optional)
Update: See the alternative, less verbose proposal below.
On entering an interactive session, show something like the following:
For PREVIEW versions:
Show both the enabled and disabled experimental features, grouped by state:
@"
PowerShell 7.2.0-preview.3
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
ENABLED experimental features:
$((Get-ExperimentalFeature | Where-Object -not Enabled).Name)
DISABLED experimental features:
$((Get-ExperimentalFeature | Where-Object Enabled).Name)
"@
It would additionally be helpful if features added since the previous stable release could be highlighted.
For STABLE / LTS versions:
Show only enabled experimental features (if any - see @rkeithhill’s more sophisticated version).
@"
PowerShell 7.2.0-preview.3
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
Enabled experimental features (type 'help about_experimental_features' for help):
$((Get-ExperimentalFeature | Where-Object -not Enabled).Name)
"@
As @DHowett notes, all this extra text should be considered part of the “logo” and should therefore be suppressed if -NoLogo
is passed to the CLI.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:20 (9 by maintainers)
Top GitHub Comments
If we commit to this, I’d really hope that it’s suppressed by
-NoLogo
.@iSazonov Can you please open a new issue describing this idea? Comparing with changing the startup logo, I think it’s a better way to improve the user awareness of the changes in the shell. Please mark it to be reviewed by the “interactive-console” WG.