Last active
December 16, 2015 08:19
-
-
Save vongillern/5404915 to your computer and use it in GitHub Desktop.
It felt like the prompt line was getting really long (between a somewhat long directory, plus the inline status). So I modified my posh-git profile to put a linebreak after the path and git status. See screenshot here: http://pic.twitter.com/GSmZcWBtYQ
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
#profile.example.ps1 | |
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) | |
# Load posh-git module from current directory | |
Import-Module .\posh-git | |
# If module is installed in a default location ($env:PSModulePath), | |
# use this instead (see about_Modules for more information): | |
# Import-Module posh-git | |
# Set up a simple prompt, adding the git prompt parts inside git repos | |
function prompt { | |
$realLASTEXITCODE = $LASTEXITCODE | |
# Reset color, which can be messed up by Enable-GitColors | |
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor | |
# ADDED - extra line so commands don't run together. Whitespace is nice. | |
Write-Host("") | |
Write-Host($pwd) -nonewline | |
Write-VcsStatus | |
$global:LASTEXITCODE = $realLASTEXITCODE | |
# MODIFIED - Added linebreak after the path + git status | |
# See screenshot here: http://pic.twitter.com/GSmZcWBtYQ | |
return " | |
>> " | |
} | |
Enable-GitColors | |
Pop-Location | |
Start-SshAgent -Quiet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment