Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

New configuration option to add a new line between the prompt and the cursor #33

Closed
wants to merge 11 commits into from

2 participants

Commits on Nov 15, 2011
  1. @eamodio

    Reworked git prompt and colors

    eamodio authored
  2. @eamodio
  3. @eamodio
Commits on Nov 16, 2011
  1. @eamodio
Commits on Jan 13, 2012
  1. @eamodio

    Removed SSHAgent for now

    eamodio authored
    Changed the PowerShell window title to be more useful
  2. @eamodio

    Merged with origin fork

    eamodio authored
Commits on Jan 26, 2012
  1. @eamodio

    Resynced with the origin

    eamodio authored
  2. @eamodio
Commits on Feb 21, 2012
  1. @eamodio
  2. @eamodio

    Removed env setting that doesn't seem to be required (mainly to keep …

    eamodio authored
    …in line with the main repo)
    
    Also reverted a change to the prompt to keep with the main repo
  3. @eamodio

    Added a configuration option to add a new line between the prompt and…

    eamodio authored
    … the cursor (since prompts can get long)
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +2 −0  GitPrompt.ps1
  2. +8 −1 profile.example.ps1
View
2  GitPrompt.ps1
@@ -44,6 +44,8 @@ $global:GitPromptSettings = New-Object PSObject -Property @{
EnableFileStatus = $true
RepositoriesInWhichToDisableFileStatus = @( ) # Array of repository paths
+ PromptOnNewLine = $false
+
Debug = $false
}
View
9 profile.example.ps1
@@ -19,8 +19,15 @@ function prompt {
Write-VcsStatus
+ $Host.UI.RawUI.WindowTitle = "$pwd $($GitStatus.Branch) - Windows Powershell"
+
$LASTEXITCODE = $realLASTEXITCODE
- return "> "
+ if ($GitPromptSettings.PromptOnNewLine) {
+ return "`r`n> "
+ }
+ else {
+ return "> "
+ }
}
Enable-GitColors
Something went wrong with that request. Please try again.