Summary
Add support for managing PowerShell profiles (both Windows PowerShell Profile.ps1 and PowerShell Core Microsoft.PowerShell_profile.ps1) as first-class dwell entries.
Motivation
PowerShell is the primary shell on Windows and widely used cross-platform. Users need to manage their PowerShell profile scripts alongside bash, zsh, fish, and other dotfiles.
Proposed behavior
dwell add $PROFILE should detect PowerShell profiles and copy them into the source directory with the appropriate prefix (e.g. dot_powershell/Microsoft.PowerShell_profile.ps1).
- Template rendering should work on
.ps1.tmpl files.
source_to_target() should correctly resolve PowerShell profile paths across Windows (%USERPROFILE%\Documents\PowerShell) and non-Windows (~/.config/powershell/).
Implementation notes
$PROFILE on Windows points to %USERPROFILE%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
- Cross-platform PowerShell Core uses
~/.config/powershell/Microsoft.PowerShell_profile.ps1
- The existing
EntryKind::from_filename() could handle dot_powershell/ prefixed files
- The
source_to_target() function in dwell-core/src/types.rs would need a new PowerShell mapping
- No existing tests cover PowerShell paths
Acceptance criteria
Summary
Add support for managing PowerShell profiles (both Windows PowerShell
Profile.ps1and PowerShell CoreMicrosoft.PowerShell_profile.ps1) as first-class dwell entries.Motivation
PowerShell is the primary shell on Windows and widely used cross-platform. Users need to manage their PowerShell profile scripts alongside bash, zsh, fish, and other dotfiles.
Proposed behavior
dwell add $PROFILEshould detect PowerShell profiles and copy them into the source directory with the appropriate prefix (e.g.dot_powershell/Microsoft.PowerShell_profile.ps1)..ps1.tmplfiles.source_to_target()should correctly resolve PowerShell profile paths across Windows (%USERPROFILE%\Documents\PowerShell) and non-Windows (~/.config/powershell/).Implementation notes
$PROFILEon Windows points to%USERPROFILE%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1~/.config/powershell/Microsoft.PowerShell_profile.ps1EntryKind::from_filename()could handledot_powershell/prefixed filessource_to_target()function indwell-core/src/types.rswould need a new PowerShell mappingAcceptance criteria
dwell add $PROFILEworks on Windowsdwell add ~/.config/powershell/Microsoft.PowerShell_profile.ps1works on Linux/macOSsource_to_target()mapsdot_powershell/profile.ps1to the correct target path.ps1.tmplextension render correctly