feat: modularize powershell profile
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
if ($host.Name -eq 'ConsoleHost') {
|
||||
if (Get-Module -ListAvailable -Name PSReadLine) {
|
||||
Import-Module PSReadLine
|
||||
}
|
||||
}
|
||||
|
||||
if (Get-Module -ListAvailable -Name Terminal-Icons) {
|
||||
Import-Module -Name Terminal-Icons
|
||||
}
|
||||
|
||||
if (Get-Command oh-my-posh -ErrorAction SilentlyContinue) {
|
||||
oh-my-posh init pwsh --config "~/.config/oh-my-posh/theme.omp.json" | Invoke-Expression
|
||||
oh-my-posh toggle command
|
||||
}
|
||||
|
||||
if (Get-Module -ListAvailable -Name posh-git) {
|
||||
Import-Module posh-git
|
||||
}
|
||||
|
||||
if ($ChocolateyProfile -and (Test-Path $ChocolateyProfile)) {
|
||||
Import-Module "$ChocolateyProfile"
|
||||
}
|
||||
|
||||
if (Get-Command zoxide -ErrorAction SilentlyContinue) {
|
||||
Invoke-Expression (& { (zoxide init powershell | Out-String) })
|
||||
}
|
||||
Reference in New Issue
Block a user