Skip to content

Instantly share code, notes, and snippets.

@haruki7049
Created October 28, 2023 22:20
Show Gist options
  • Save haruki7049/f87b4469499d4731e6ebba90086c4140 to your computer and use it in GitHub Desktop.
Save haruki7049/f87b4469499d4731e6ebba90086c4140 to your computer and use it in GitHub Desktop.
Import-Module PSReadline
Set-PSReadLineOption -EditMode Emacs
function Prompt {
$username = "$($env:USER)"
$path = "$($executionContext.SessionState.Path.CurrentLocation)"
Write-Host $username -NoNewline -ForeGroundColor blue
Write-Host "`$" -NoNewline -ForeGroundColor green
Write-Host $path -NoNewline -ForeGroundColor DarkMagenta
Write-Host " $(Get-Date -Format "MM/dd/yyyy HH:mm")" -ForeGroundColor yellow
Write-Host ">" -NoNewline -ForeGroundColor yellow
return " "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment