Update PS1 prompt, thanks to perikiyoxd
All checks were successful
Builds / XTchain (full, linux) (push) Successful in 1h30m39s
Builds / XTchain (full, windows) (push) Successful in 1h31m10s
Builds / XTchain (minimal, linux) (push) Successful in 2m44s
Builds / XTchain (minimal, windows) (push) Successful in 2m13s

This commit is contained in:
Aiken Harris 2025-07-09 22:56:50 +02:00 committed by CodingWorkshop Signing Team
parent d8d25de0d0
commit 6463d50cd3
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -35,13 +35,23 @@ version
# Invoke shell with fancy prompt # Invoke shell with fancy prompt
function global:prompt { function global:prompt {
$esc = [char]27 $PROMPT = " XT Toolchain "
$resetColor = "$esc[0m" $CWD = (Get-Location).Path
$pathColor = "$esc[1;34m" $CHEVRON = [char]0xE0B0
$toolchainColor = "$esc[1;97;44m" $SEGMENTS = @(
$toolchainText = "${toolchainColor} XT Toolchain " @{ TEXT = $PROMPT; BGCOLOR = "Blue"; FGCOLOR = "White" },
$pathText = "${pathColor}$($PWD.ProviderPath) " @{ TEXT = " $CWD "; BGCOLOR = "DarkCyan"; FGCOLOR = "White" }
$arrow = "" )
"${toolchainText}$arrow$pathText$resetColor> " for ($INDEX = 0; $INDEX -lt $SEGMENTS.Count; $INDEX++) {
$SEGMENT = $SEGMENTS[$INDEX]
$NEXTBG = if ($INDEX + 1 -lt $SEGMENTS.Count) { $SEGMENTS[$INDEX + 1].BGCOLOR } else { "Default" }
Write-Host $SEGMENT.TEXT -NoNewLine -ForegroundColor $SEGMENT.FGCOLOR -BackgroundColor $SEGMENT.BGCOLOR
if ($NEXTBG -ne "Default") {
Write-Host $CHEVRON -NoNewLine -ForegroundColor $SEGMENT.BGCOLOR -BackgroundColor $NEXTBG
} else {
Write-Host $CHEVRON -NoNewLine -ForegroundColor $SEGMENT.BGCOLOR
}
}
return " "
} }
Set-Location -Path $SRCDIR Set-Location -Path $SRCDIR