mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 02:20:11 -08:00
fix: ensure Terminal-Icons and PSReadLine modules are installed before importing in PowerShell profile
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
if (-not (Get-Module -ListAvailable -Name Terminal-Icons)) {
|
||||
Import-Module -Name Terminal-Icons
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name PSReadLine)) {
|
||||
Import-Module -Name PSReadLine
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name tiPS)) {
|
||||
Install-Module -Name tiPS -Scope CurrentUser
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name PSScriptAnalyzer)) {
|
||||
Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name Terminal-Icons)) {
|
||||
Install-Module -Name Terminal-Icons -Scope CurrentUser
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name PSReadLine)) {
|
||||
Install-Module -Name PSReadLine -Force -Scope CurrentUser
|
||||
}
|
||||
|
||||
|
||||
if (-not (Get-Module -ListAvailable -Name Terminal-Icons)) {
|
||||
Import-Module -Name Terminal-Icons
|
||||
}
|
||||
if (-not (Get-Module -ListAvailable -Name PSReadLine)) {
|
||||
Import-Module -Name PSReadLine
|
||||
}
|
||||
|
||||
# kali.omp.json
|
||||
oh-my-posh --init --shell pwsh --config "$env:OneDrive\Documents\PowerShell\prompt\themes\easy-term.omp.json" | Invoke-Expression
|
||||
|
||||
Reference in New Issue
Block a user