Created
February 3, 2024 08:02
-
-
Save abdmmar/3282f14e4a73fcffb8f0c270f514f371 to your computer and use it in GitHub Desktop.
PowerShell Profile that use oh-my-posh , terminal icons, autocomplete, history, and custom aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setup | |
| ## https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/zash.omp.json | |
| oh-my-posh --init --shell pwsh --config ~/zash.omp.json | invoke-expression | |
| # Modules | |
| ## Terminal-Icons | |
| Import-Module -Name Terminal-Icons | |
| Import-Module PSReadLine | |
| Set-PSReadLineOption -PredictionSource History | |
| Set-PSReadLineOption -PredictionViewStyle ListView | |
| Set-PSReadLineOption -EditMode Windows | |
| # Aliases | |
| ## pnpm | |
| function Set-PnpmExecute { & pnpm dlx $args} | |
| Set-Alias pn pnpm | |
| New-Alias -Name pnx -Value Set-PnpmExecute | |
| ## git | |
| function Set-GitCommit { & git commit -m $args} | |
| New-Alias -Name gcmm -Value Set-GitCommit | |
| function Set-GitCommitNoVerify {& git commit -m --no-verify $args} | |
| New-Alias -Name gcnm -Value Set-GitCommitNoVerify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment