Repository navigation
PowerStub v2.3.0
·
2 commits
to main
since this release
PowerStub 2.3.0
- New
Add-PowerStubToProfilecommand: makes PowerStub load in every new session. It replaces the README's oldAdd-Content $PROFILE "nImport-Module PowerStub"` step, which failed when the profile folder did not exist and could add a line that never ran (for example after a trailing line-continuation backtick).- Creates the profile file and its folder when needed.
- Writes to
$PROFILE.CurrentUserAllHostsby default, so the console, Windows Terminal and VS Code all load PowerStub. Pass-Path $PROFILEfor the current host only. - Adds
Import-Module PowerStubfor a PowerShell Gallery install, or an import of the exact manifest path for a source or archive install. - Safe to run again: does nothing when the profile already imports PowerStub.
- Changes nothing when the profile has syntax errors or the new line would not run as its own statement. Keeps the file's encoding and writes through symbolic links. Supports
-WhatIf.
- New
Remove-PowerStubFromProfilecommand: removes the lines that import PowerStub from a profile, including ones added by hand. An import that shares a line with other code is left in place with a warning.
Whats Changed
- feat(config): add Add-PowerStubToProfile and Remove-PowerStubFromProfile
Full Changelog: v2.2.1...v2.3.0