Skip to content

Add PowerShell 7.6.5 with enhanced console configuration and Nerd Font support - #26

Merged
jwaisner merged 2 commits into
mainfrom
7.6.5
Aug 30, 2026
Merged

jwaisner merged 2 commits into
mainfrom
7.6.5

Conversation

@N6REJ

@N6REJ N6REJ commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@N6REJ
N6REJ requested a review from jwaisner August 26, 2026 11:55
@N6REJ N6REJ added the enhancement ✨ Improve program label Aug 26, 2026
Auto-generated from release 2026.8.26
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Package PowerShell 7.6.5 with enhanced Nerd Font console

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds self-contained PowerShell 7.6.5 bundle metadata and launch configuration.
• Configures Nerd Fonts, UTF-8, Oh My Posh, PSReadLine, and Terminal-Icons.
• Advances bundle release metadata to 2026.8.26.
Diagram

graph TD
  BUILD["Build Metadata"] --> BUNDLE["7.6.5 Bundle"] --> LAUNCH["Console Launcher"] --> FONT["Font Registration"] --> REG[("Windows Registry")]
  LAUNCH --> SHELL["PowerShell 7.6.5"] --> PROFILE["Enhanced Profile"]
  PROFILE --> DEPS["Prompt Modules"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate version bundles from shared templates
  • ➕ Reduces duplication across PowerShell versions
  • ➕ Prevents launcher and profile behavior from drifting
  • ➖ Requires build-system changes
  • ➖ Makes each source version directory less self-contained

Recommendation: Keep the self-contained 7.6.5 directory for consistency with existing bundle packaging and straightforward version-specific builds. If more releases continue copying identical launcher and profile files, introduce generation from shared templates to reduce maintenance overhead.

Files changed (7) +472 / -1

Enhancement (3) +379 / -0
Microsoft.PowerShell_profile.ps1Configure the enhanced Bearsampp PowerShell profile +52/-0

Configure the enhanced Bearsampp PowerShell profile

• Adds bundled module paths and initializes Oh My Posh, Terminal-Icons, and PSReadLine. It also configures history search, completion, syntax colors, and an interactive welcome banner.

bin/powershell7.6.5/config/Microsoft.PowerShell_profile.ps1

register-fonts.ps1Add per-user Nerd Font discovery and registration +137/-0

Add per-user Nerd Font discovery and registration

• Discovers bundled TTF and OTF files, extracts internal family names, and copies changed fonts into the user font directory. It registers fonts for Windows and Console Host, loads them through GDI, and broadcasts the settings change.

bin/powershell7.6.5/config/register-fonts.ps1

powershell.batLaunch PowerShell with UTF-8 and Nerd Font settings +190/-0

Launch PowerShell with UTF-8 and Nerd Font settings

• Adds argument handling, executable fallback, font detection, registry configuration, UTF-8 setup, and custom profile loading. It opens a new PowerShell process so Console Host applies the configured font and title settings.

bin/powershell7.6.5/powershell.bat

Documentation (1) +67 / -0
README.mdDocument Nerd Font and profile customization +67/-0

Document Nerd Font and profile customization

• Explains Cascadia Mono Nerd Font setup for Windows Terminal and Console Host. Documents the profile features, environment variables, theme selection, and PSReadLine customization.

bin/powershell7.6.5/config/README.md

Other (3) +26 / -1
bearsampp.confDefine the PowerShell 7.6.5 bundle configuration +9/-0

Define the PowerShell 7.6.5 bundle configuration

• Declares the packaged executable, launcher, profile, Nerd Font, console dimensions, and release placeholder for PowerShell 7.6.5.

bin/powershell7.6.5/bearsampp.conf

deps.propertiesDeclare enhanced console dependencies +16/-0

Declare enhanced console dependencies

• Defines download sources for Oh My Posh, the paradox theme, Terminal-Icons, and PSReadLine, plus the expected Nerd Font family name.

bin/powershell7.6.5/deps.properties

build.propertiesAdvance the bundle release date +1/-1

Advance the bundle release date

• Updates the module release identifier from 2026.6.25 to 2026.8.26 for the new package release.

build.properties

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Nested options are ignored 🐞 Bug ≡ Correctness
Description
Because the BEARSAMPP_SHELL jump occurs before argument parsing, invoking this launcher from the
PowerShell session it creates ignores the documented --title and --startingDirectory options.
The nested shell consequently opens with the default title and current directory instead of the
requested values.
Code

bin/powershell7.6.5/powershell.bat[R32-33]

+REM Check if we are running in a specialized console that doesn't need re-config
+if defined BEARSAMPP_SHELL goto skip_registry_config
Evidence
The launcher sets BEARSAMPP_SHELL=1 before starting PowerShell, so child processes inherit it. On
a nested invocation line 33 jumps to line 158, bypassing the only assignments from --title and
--startingDirectory at lines 48-64; the unchanged defaults are then used in the generated command.

bin/powershell7.6.5/powershell.bat[26-33]
bin/powershell7.6.5/powershell.bat[48-64]
bin/powershell7.6.5/powershell.bat[158-172]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Nested launcher invocations skip all supported option parsing because `BEARSAMPP_SHELL` jumps past the parser.

## Issue Context
The launched PowerShell inherits `BEARSAMPP_SHELL=1`, so this affects calls made from that shell.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[32-73]
- bin/powershell7.6.5/powershell.bat[158-172]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. PowerShell arguments are discarded 🐞 Bug ≡ Correctness
Description
Every argument other than the two launcher options and exit is shifted away without being saved,
and the final pwsh.exe command contains no forwarded argument list. Calls such as `powershell.bat
script.ps1 or powershell.bat -File script.ps1` therefore open an interactive shell without
executing the requested script.
Code

bin/powershell7.6.5/powershell.bat[R66-72]

+REM If 'exit' or any other non-flag argument is passed, it might be intended for PowerShell
+REM We check if it's 'exit' specifically to handle the -NoExit flag
+if /i "%~1"=="exit" (
+    set "NO_EXIT=0"
+)
+shift
+goto parse_args
Evidence
The parser handles only --title, --startingDirectory, and the special exit token, then
unconditionally shifts unknown arguments. Both final start branches invoke PowerShell solely with
the internally generated PS_COMMAND, with no %* or accumulated arguments.

bin/powershell7.6.5/powershell.bat[48-72]
bin/powershell7.6.5/powershell.bat[169-185]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The launcher discards normal PowerShell arguments instead of forwarding them to `pwsh.exe`.

## Issue Context
Preserve launcher-specific options while retaining all other arguments with safe batch quoting, then append them to the final launch command without conflicting with the generated initialization command.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[48-72]
- bin/powershell7.6.5/powershell.bat[169-185]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Exclamation marks corrupt paths 🐞 Bug ≡ Correctness
Description
Delayed expansion is enabled while %CD% and %~2 are assigned and later expanded with !…!, so
literal exclamation marks in a valid Windows working directory or --startingDirectory value are
removed or interpreted as expansion delimiters. The generated Set-Location then targets a
different path and shell startup fails to enter the requested directory.
Code

bin/powershell7.6.5/powershell.bat[R9-10]

+setlocal EnableDelayedExpansion
+pushd "%CD%"
Evidence
Delayed expansion is enabled globally at line 9; the current directory is interpolated at line 28
and the supported directory argument at line 61, after which both values are read through
delayed-expansion syntax at lines 99 and 172. Thus a literal ! in either source value participates
in cmd's delayed-expansion scan rather than remaining path data.

bin/powershell7.6.5/powershell.bat[9-14]
bin/powershell7.6.5/powershell.bat[26-30]
bin/powershell7.6.5/powershell.bat[60-64]
bin/powershell7.6.5/powershell.bat[97-100]
bin/powershell7.6.5/powershell.bat[169-172]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Enabled delayed expansion corrupts directory and title values containing literal `!` characters.

## Issue Context
Batch parameter and environment expansion must preserve arbitrary valid Windows path characters while still supporting variables needed inside parenthesized blocks.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[9-14]
- bin/powershell7.6.5/powershell.bat[48-64]
- bin/powershell7.6.5/powershell.bat[97-100]
- bin/powershell7.6.5/powershell.bat[169-172]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
4. Console font slots overwritten 🐞 Bug ☼ Reliability
Description
Each launch forcibly replaces fixed machine-wide and per-user Console\TrueTypeFont values with the
Bearsampp font. Existing fonts registered in those shared slots are lost, affecting console
applications unrelated to this PowerShell bundle.
Code

bin/powershell7.6.5/powershell.bat[R140-143]

+reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "000" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
+reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "0000" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
+reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "0" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
+reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "00" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
Evidence
Lines 140-144 use reg add ... /f on hard-coded values in shared HKLM and HKCU TrueTypeFont keys.
The same launcher already has a scoped mechanism at lines 107-115 for its own window title, while
the registration script also forcibly claims the shared 00 value, confirming these writes do not
preserve existing registrations.

bin/powershell7.6.5/powershell.bat[107-115]
bin/powershell7.6.5/powershell.bat[134-144]
bin/powershell7.6.5/config/register-fonts.ps1[109-116]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The launcher overwrites fixed shared console-font registry values and removes registrations owned by other software or the user.

## Issue Context
The launcher already writes a window-title-specific `FaceName`; any required TrueTypeFont registration should reuse an existing matching value or select an unused value without modifying unrelated entries.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[107-115]
- bin/powershell7.6.5/powershell.bat[134-144]
- bin/powershell7.6.5/config/register-fonts.ps1[109-116]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: ⚖️ Balanced

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +32 to +33
REM Check if we are running in a specialized console that doesn't need re-config
if defined BEARSAMPP_SHELL goto skip_registry_config

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Nested options are ignored 🐞 Bug ≡ Correctness

Because the BEARSAMPP_SHELL jump occurs before argument parsing, invoking this launcher from the
PowerShell session it creates ignores the documented --title and --startingDirectory options.
The nested shell consequently opens with the default title and current directory instead of the
requested values.
Agent Prompt
## Issue description
Nested launcher invocations skip all supported option parsing because `BEARSAMPP_SHELL` jumps past the parser.

## Issue Context
The launched PowerShell inherits `BEARSAMPP_SHELL=1`, so this affects calls made from that shell.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[32-73]
- bin/powershell7.6.5/powershell.bat[158-172]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +66 to +72
REM If 'exit' or any other non-flag argument is passed, it might be intended for PowerShell
REM We check if it's 'exit' specifically to handle the -NoExit flag
if /i "%~1"=="exit" (
set "NO_EXIT=0"
)
shift
goto parse_args

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Powershell arguments are discarded 🐞 Bug ≡ Correctness

Every argument other than the two launcher options and exit is shifted away without being saved,
and the final pwsh.exe command contains no forwarded argument list. Calls such as `powershell.bat
script.ps1 or powershell.bat -File script.ps1` therefore open an interactive shell without
executing the requested script.
Agent Prompt
## Issue description
The launcher discards normal PowerShell arguments instead of forwarding them to `pwsh.exe`.

## Issue Context
Preserve launcher-specific options while retaining all other arguments with safe batch quoting, then append them to the final launch command without conflicting with the generated initialization command.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[48-72]
- bin/powershell7.6.5/powershell.bat[169-185]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +9 to +10
setlocal EnableDelayedExpansion
pushd "%CD%"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

3. Exclamation marks corrupt paths 🐞 Bug ≡ Correctness

Delayed expansion is enabled while %CD% and %~2 are assigned and later expanded with !…!, so
literal exclamation marks in a valid Windows working directory or --startingDirectory value are
removed or interpreted as expansion delimiters. The generated Set-Location then targets a
different path and shell startup fails to enter the requested directory.
Agent Prompt
## Issue description
Enabled delayed expansion corrupts directory and title values containing literal `!` characters.

## Issue Context
Batch parameter and environment expansion must preserve arbitrary valid Windows path characters while still supporting variables needed inside parenthesized blocks.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[9-14]
- bin/powershell7.6.5/powershell.bat[48-64]
- bin/powershell7.6.5/powershell.bat[97-100]
- bin/powershell7.6.5/powershell.bat[169-172]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +140 to +143
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "000" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "0000" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "0" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1
reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont" /v "00" /t REG_SZ /d "!FONT_NAME!" /f >nul 2>&1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

4. Console font slots overwritten 🐞 Bug ☼ Reliability

Each launch forcibly replaces fixed machine-wide and per-user Console\TrueTypeFont values with the
Bearsampp font. Existing fonts registered in those shared slots are lost, affecting console
applications unrelated to this PowerShell bundle.
Agent Prompt
## Issue description
The launcher overwrites fixed shared console-font registry values and removes registrations owned by other software or the user.

## Issue Context
The launcher already writes a window-title-specific `FaceName`; any required TrueTypeFont registration should reuse an existing matching value or select an unused value without modifying unrelated entries.

## Fix Focus Areas
- bin/powershell7.6.5/powershell.bat[107-115]
- bin/powershell7.6.5/powershell.bat[134-144]
- bin/powershell7.6.5/config/register-fonts.ps1[109-116]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@jwaisner
jwaisner merged commit 6a9df30 into main Aug 30, 2026
2 checks passed
@jwaisner
jwaisner deleted the 7.6.5 branch August 30, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ Improve program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants