PortValhalla/scripts/Windows/Config/Oh My Posh/Install.ps1

17 lines
508 B
PowerShell

#!/bin/pwsh
param($context)
. "$PSScriptRoot/../../Scripts/Context.ps1";
[Context] $context = $context;
Write-Host "Configuring Oh My Posh!";
$createInvokation = {
param($initializer)
return ". ([scriptblock]::Create(($initializer) -join `"``n`"))";
}
$context.AddPowerShellProfileStatement(
"999_Oh My Posh",
[string[]]@(
$createInvokation.Invoke("oh-my-posh init pwsh"),
$createInvokation.Invoke("oh-my-posh completion powershell")) -join [System.Environment]::NewLine);