Created
September 15, 2017 18:12
-
-
Save JasonMorgan/0ad1f49543c0980ceeb893154a95df01 to your computer and use it in GitHub Desktop.
Powershell profiule for PS Core
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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