Refactor the Oh My Posh profile
This commit is contained in:
parent
65a44675b2
commit
d4e2b633d5
1 changed files with 7 additions and 2 deletions
|
@ -5,8 +5,13 @@ param($context)
|
|||
[Context] $context = $context;
|
||||
Write-Host "Configuring Oh My Posh!";
|
||||
|
||||
$createInvokation = {
|
||||
param($initializer)
|
||||
return "& ([scriptblock]::Create(($initializer) -join `"``n`"))";
|
||||
}
|
||||
|
||||
$context.AddPowerShellProfileStatement(
|
||||
"999_Oh My Posh",
|
||||
@(
|
||||
'oh-my-posh init pwsh | Invoke-Expression;',
|
||||
"oh-my-posh completion powershell | Invoke-Expression;") -join [System.Environment]::NewLine);
|
||||
$createInvokation.Invoke("oh-my-posh init pwsh"),
|
||||
$createInvokation.Invoke("oh-my-posh completion powershell")) -join [System.Environment]::NewLine);
|
||||
|
|
Loading…
Reference in a new issue