This directory contains modular PowerShell profile components organized by functionality.
- Basic command aliases (
pn,p,lg,cat) - Function aliases (
prd,pe,dcu,dc) - Short commands for common development tasks
- Multi-repository management functions
- Branch checking and updating (
Show-CurrentBranches,Update-All-Repos) - Repository switching and status functions
- Startup function (
up) for development environment
- Development workflow utilities
- Package.json discovery (
Find-NearestPackageJson) - NPM documentation browser (
Open-Docs) - File selection and VS Code integration (
Open-With-VSCode)
- Git helper functions
- Interactive branch switching (
gs) - Git aliases browser (
ghelp)
- Terminal UI improvements
- Enhanced file listing (
Eza) - PSReadLine prediction view toggling (
Set-PredictionView) - Broot integration (
br)
- GitHub CLI auto-completion
- Tab completion for
ghcommands - Supports all PowerShell completion modes
Import all modules by sourcing the main profile:
. $PROFILEOr import individual modules as needed:
Import-Module "$env:USERPROFILE\.pwsh\Aliases.psm1" -ForceWhen adding new functions:
- Add the function to the appropriate module
- Export it using
Export-ModuleMember - Reload the module with
-Forceflag
Example:
Export-ModuleMember -Function MyNewFunction -Alias mnfYour original profile has been preserved as Microsoft.PowerShell_profile.ps1.
The new modular profile is available as Microsoft.PowerShell_profile_modular.ps1.
To switch to the modular version:
Copy-Item "$env:USERPROFILE\Documents\PowerShell\Microsoft.PowerShell_profile_modular.ps1" "$PROFILE"