Skip to content

Instantly share code, notes, and snippets.

@JasonMorgan
Created September 15, 2017 18:12
Show Gist options
  • Save JasonMorgan/0ad1f49543c0980ceeb893154a95df01 to your computer and use it in GitHub Desktop.
Save JasonMorgan/0ad1f49543c0980ceeb893154a95df01 to your computer and use it in GitHub Desktop.
Powershell profiule for PS Core
start-job -ScriptBlock {Update-Help -Force} | Out-Null
function ql { $args }
function qs { "$args" }
$Host.PrivateData.ErrorForegroundColor = 'magenta'
$Host.PrivateData.VerboseForegroundColor = 'cyan'
$host.ui.RawUI.WindowTitle = "Jason`'s Rocking PowerShell Console: $([Math]::Round((Get-Process -id $PID).WorkingSet/1mb,2)) MB Memory used"
function prompt {
$Branch = Get-GitBranch
if (! $Branch) {
"$((hostname).split('.')[0]):$(("$($PWD.path)" -replace $HOME,'~').split('/')[-1]) $ENV:USER $('>' * ($nestedPromptLevel + 1)) "
} else {
"$((hostname).split('.')[0]):$(("$($PWD.path)" -replace $HOME,'~').split('/')[-1]) $ENV:USER [$Branch] $('>' * ($nestedPromptLevel + 1)) "
}
$host.ui.RawUI.WindowTitle = "Jason`'s Rocking PowerShell Console: $([Math]::Round((Get-Process -id $PID).WorkingSet/1mb,2)) MB Memory used"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment