by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Rob Reynolds
@ferventcoder
haven't seen you much this year. Heads down for both of us I think
Keith Dahlby
@dahlbyk
indeed
Keith Dahlby
@dahlbyk
@eeevans not sure if you will have automatically received notifications on my suggestions, so mentioning you just in case :grinning:
Edward Evans
@eeevans
thanks #Error gave me a hint that poshScope has not been defined..I found these lines at the end of my $profile # Rename-Item Function:\Prompt PoshGitPrompt -Force # function Prompt() {if(Test-Path Function:\PrePoshGitPrompt){++$global:poshScope; New-Item function:\script:Write-host -value "param([object] $object,$backgroundColor, $foregroundColor, [switch]$nonewline) " -Force | Out-Null;$private:p = PrePoshGitPrompt; if(--$global:poshScope -eq 0) {Remove-Item function:\Write-Host -Force}}PoshGitPrompt}

commenting them out fixed it
Keith Dahlby
@dahlbyk
hrm, OK - that code comes from the Chocolatey package install, and honestly it just needs to be rewritten. I believe there's an open PR that adjusts how the posh-git prompt is handled, but I just haven't taken time to review it. :frowning:
Keith Hill
@rkeithhill
OK the Gitter badge on the posh-git repo is live.
Rob Reynolds
@ferventcoder
Yay
Keith Hill
@rkeithhill
And now we have a build badge for our Pester tests. :-)
Joey Piccola
@joeypiccola
I have a win8.1 machine with PS.5 installed that I can't seem to get Posh-Git to work on. When I cd into a git directory the prompt does not change. I've installed and imported the module.
Joey Piccola
@joeypiccola
I figured it out. I had define some vars in my profile.
Keith Hill
@rkeithhill
@joeypiccola That experience should change when posh-git 0.7.0 releases. With the new version, simply importing the posh-git module will change the PowerShell prompt function to display Git status summary info in the prompt. However, posh-git will not change the prompt function if it detects that you have your own, customized prompt function. In that case, look at https://github.com/dahlbyk/posh-git/wiki/Customizing-Your-PowerShell-Prompt for examples of how to integrate posh-git into your own prompt function.
Joseph Musser
@jnm2
Can I move C:\tools\poshgit to %appdata%\poshgit somehow?
Am I able to use the Chocolatey package without creating a C:\tools folder?
Rob Reynolds
@ferventcoder
@jnm2 change $env:ChocolateyToolsLocation to somewhere else that could be your$env:AppData folder
and it will just start working. HTH
Joseph Musser
@jnm2
Cool, thanks!
Rob Reynolds
@ferventcoder
in powershell, run ls env: and look to be sure that is the name of the folder
Felix Becker
@felixfbecker
Is it possible to install posh-git on MacOS?
I tried it with Install-Module but my prompt now looks like this:
/Users/felix/git/vscode [master ≡]> /Users/felix/git/vscode [master ≡]
(duplicated)
Felix Becker
@felixfbecker
filed #486
David Gardiner
@flcdrg
I've just started using the VSTS CLI tool (https://docs.microsoft.com/en-us/cli/vsts/overview), that integrates with Git. I'm wondering is this something you'd consider a PR to add to posh-git, or is there a way to make an 'addon' to posh-git to extend it to support this kind of tool?
Keith Dahlby
@dahlbyk
@flcdrg I assume you're referring to tab expansion support for the VSTS commands?
David Gardiner
@flcdrg
Yes, sorry I should have been clearer😀
Keith Dahlby
@dahlbyk
:+1: I'm not sure it really makes sense to include VSTS bindings with posh-git, but I'd certainly want to make sure our tab expansion is compatible with other tab expansion.
I'm not 100% certain posh-git plays nicely with Register-ArgumentCompleter, but it seems like it should...
David Gardiner
@flcdrg
Interesting. I'll have to take a closer look at that. I wonder if it would still work with the git integration (https://docs.microsoft.com/en-us/cli/vsts/git), or if posh-git would swallow everything that began with "git "
Keith Dahlby
@dahlbyk
Oh, neat. I didn't notice the git command. I'm absolutely cool with adding tab expansion to posh-git for git pr <tab>
David Gardiner
@flcdrg
👍
@PhDuck
Can anyone confirm what happens after a command is executed and the next line in the prompt is being drawn. In my current repo a two second delay happens.
Without looking at the code I would guess a call to git status happens and is used to give the summary.
@PhDuck
I was right. My savior was the following setting: $GitPromptSettings.EnableFileStatus =$false
Zach
@zawisman

Not :100: that it is a posh-git thing but thought i would post here for some feed back
https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.8.txt#L85-L86
states that

"git merge" learned the "--edit" option to allow users to edit the
merge commit log message.

however i have to explicitly pass -e to my git merge -e feat in order to get my editor to open to change the merge message

thoughts?

i have an alias

[alias]
mrg = merge -e

but would like to not have to use it

Keith Dahlby
@dahlbyk
@PhDuck missed this until now - yes, a git status runs on every prompt, which can be slow for large repos. You can set $GitPromptSettings.Debug =$true to see how we're spending our time.
@zawisman try git config branch.master.mergeOptions "-e"
https://git-scm.com/docs/git-config#git-config-branchltnamegtmergeOptions
Zach
@zawisman

@dahlbyk hmm that worked. I tried to add

[merge]
edit = true

but that did not work. Not sure why that does not adding the edit flag on the branch merge options does but i'll take it. Good to know. Thanks for pointing that option out

the-j0k3r
@the-j0k3r
ahhh
so how many of you guys use a dark theme for gitter?
the-j0k3r
@the-j0k3r
none in on gitter I see :)