Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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

Eric Amodio Keith Dahlby
Commits on Nov 15, 2011
  1. Eric Amodio

    Reworked git prompt and colors

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

    Removed SSHAgent for now

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

    Merged with origin fork

    eamodio authored
Commits on Jan 26, 2012
  1. Eric Amodio

    Resynced with the origin

    eamodio authored
  2. Eric Amodio
Commits on Feb 21, 2012
  1. Eric Amodio
  2. Eric Amodio

    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. Eric Amodio

    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
2  GitPrompt.ps1
View
@@ -44,6 +44,8 @@ $global:GitPromptSettings = New-Object PSObject -Property @{
EnableFileStatus = $true
RepositoriesInWhichToDisableFileStatus = @( ) # Array of repository paths
+ PromptOnNewLine = $false
+
Debug = $false
}
9 profile.example.ps1
View
@@ -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.