posh-git Release v0.1

I’ve made a bit of progress on posh-git since my last post and figured now is as good a time as any to tag a v0.1 release, which you can download here. In this release…

Git Branch in PowerShell Prompt

Prompt branch information now includes merge/rebase/am status information, modeled after Git Bash.

Settings

Prompt colors and text separators have been broken out into a global $GitPromptSettings object that can be modified in your profile after GitPrompt.ps1 executes…

$GitPromptSettings.WorkingForegroundColor = [ConsoleColor]::Red
$GitPromptSettings.UntrackedText = ' WARNING: UNTRACKED FILEZ!!1'

We also define $GitTabSettings, which currently provides an AllCommands property which expands completion for git <tab> to include all commands instead of only the common terms listed in git --help. New settings will almost certainly be added over time.

Other Improvements

  • The number of external calls has been reduced.
  • Added Enable-GitColors, called in the example profile, to set common environment variables.
  • Working/Index counts now include Unmerged files if appropriate.
  • Tab expansion is now case-insensitive.
  • Tab expansion includes operations within git stash and git remote.
  • Tab expansion for files with spaces adds quotes like normal file completion.
  • Miscellaneous bug fixes (hat tip to Jean-Francois Cantin and Mark Embling)

Next Steps

  • Testing! I’d like to figure out a way to run some integration tests that verify a given repository state renders the expected prompt. If you have suggestions how to approach this, or know how other Git integration projects are tested, please let us know over at the Google Group.
  • Documentation! How to get started, what the project provides, etc.
  • Expanded Tab Completion! Common config options, stashes, long command options (--interactive and such), the list goes on. The Bash implementation needs 2300 lines; we’re at 128 so far.

Please give the project a try and let us know how we’re doing!

Related Articles:

About Keith Dahlby

I'm a .NET developer, Git enthusiast and language geek from Cedar Rapids, IA. I work as a software guru at J&P Cycles and studied Human-Computer Interaction at Iowa State University.
This entry was posted in git, posh-git, powershell. Bookmark the permalink. Follow any comments here with the RSS feed for this post.