HideStatusWhenZero Setting

1 view
Skip to first unread message

Jeremy Skinner

unread,
Apr 5, 2010, 11:30:35 AM4/5/10
to posh...@googlegroups.com
I've added a new setting in my fork (http://github.com/JeremySkinner/posh-git) called 'HideStatusWhenZero' that stop parts of the prompt from displaying when their value is zero. The default is $false, but you can enable it from within your profile by calling $Global:GitPromptSettings.HideStatusWhenZero = $true

The end result is a shorter prompt:

testrepo [master +1 !]»

vs

testrepo [master +1 ~0 -0 !]»

Jeremy

Mark Embling

unread,
Apr 5, 2010, 11:32:28 AM4/5/10
to posh...@googlegroups.com
I'm glad you added that :). I was intending to do that ever since I saw you'd done that to your older version but never got around to doing it. 

Keith Dahlby

unread,
Apr 5, 2010, 11:37:06 AM4/5/10
to posh...@googlegroups.com
To make the logic cleaner, could I suggest we switch it to be ShowStatusWhenZero (with default $true)?

if($s.ShowStatusWhenZero -or $status.Index.Deleted) { ...

Jeremy Skinner

unread,
Apr 5, 2010, 11:38:09 AM4/5/10
to posh...@googlegroups.com
Good idea - I'll make the change and send another pull request.
Reply all
Reply to author
Forward
0 new messages