Initial commit

This commit is contained in:
2025-04-29 20:54:26 +03:00
commit bf7f6c29be
11 changed files with 291 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
function Prompt {
$label = "PowerShell"
$color = 12
$adminColor = 88
$bold = 1
$principal = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent())
if ($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$color = $adminColor
}
$path = $pwd.Path
if ($path.StartsWith($HOME)) {
$path = "~" + $path.Substring($HOME.Length)
}
$e = $([char]27)
return "`n$e[$bold;48;5;$color;38;5;231m $label $e[;38;5;$color;48;5;240m$e[38;5;252m $path $e[;38;5;240m$e[m "
}