2023-07-27 00:57:35 +00:00
|
|
|
#!/bin/pwsh
|
|
|
|
param($context)
|
|
|
|
. "$PSScriptRoot/../../Scripts/Context.ps1";
|
|
|
|
|
|
|
|
[Context] $context = $context;
|
|
|
|
Write-Host "Configuring Oh My Posh!";
|
2023-07-27 01:09:19 +00:00
|
|
|
|
2023-07-27 11:09:30 +00:00
|
|
|
$createInvokation = {
|
|
|
|
param($initializer)
|
2023-07-27 11:15:09 +00:00
|
|
|
return ". ([scriptblock]::Create(($initializer) -join `"``n`"))";
|
2023-07-27 11:09:30 +00:00
|
|
|
}
|
|
|
|
|
2023-07-27 01:09:19 +00:00
|
|
|
$context.AddPowerShellProfileStatement(
|
|
|
|
"999_Oh My Posh",
|
2023-07-27 12:16:26 +00:00
|
|
|
[string[]]@(
|
2023-07-27 11:09:30 +00:00
|
|
|
$createInvokation.Invoke("oh-my-posh init pwsh"),
|
|
|
|
$createInvokation.Invoke("oh-my-posh completion powershell")) -join [System.Environment]::NewLine);
|