Skip to content

Instantly share code, notes, and snippets.

@cptpiepmatz
Last active December 24, 2022 00:48
Show Gist options
  • Save cptpiepmatz/2fee8be91428cf4141e83ab1b64f43f5 to your computer and use it in GitHub Desktop.
Save cptpiepmatz/2fee8be91428cf4141e83ab1b64f43f5 to your computer and use it in GitHub Desktop.
My personal Prompt Style for Powershell
$ESC = [char]27
switch ($env:ComputerName) {
"TIMSYOGA" {$computerName = "TY"}
"TIMSTOWER" {$computerName = "TT"}
default {$computerName = $env:ComputerName}
}
function global:prompt {
"PS " +
"$ESC[38;5;33m" +
$env:UserName +
"@" +
$computerName +
"$ESC[0m" +
":" +
"$ESC[38;5;214m" +
("$pwd").Replace("$home", "~") +
"$ESC[0m" +
"> "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment