Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge settings with Posh-Hg because I'm tired of having dueling sets #111

Closed
wants to merge 2 commits into from

Conversation

Jaykul
Copy link

@Jaykul Jaykul commented Aug 18, 2013

Submitting a similar set to posh-hg -- could probably go further than this to integrate them, but this is enough for step one

@dahlbyk dahlbyk mentioned this pull request Oct 5, 2013
@Jaykul
Copy link
Author

Jaykul commented Nov 15, 2013

Could you comment on why you're leaving this just sitting here?

@dahlbyk
Copy link
Owner

dahlbyk commented Nov 15, 2013

Because I'm not a good maintainer. :(

Honestly, I just didn't have time to review when it first came in and forgot to get back to it. I'll try to remedy that soon, sorry.

@youcandanch
Copy link

👍 response, would read again.

$Global:VcsPromptStatuses = @()
}
function Global:Write-VcsStatus { $Global:VcsPromptStatuses | foreach { & $_ } }

function global:Write-VcsStatus { $Global:VcsPromptStatuses | Invoke-Command }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition doesn't actually work as is on PS3. Needs to be foreach { Invoke-Command -ScriptBlock $_ } instead of just Invoke-Command

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Invoke-Command -ScriptBlock $_ equivalent to & $_?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does appear to behave the same after testing and discussions in #PowerShell. I haven't been able to talk to Joel yet about why he was preferring the Invoke-Command method over &.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invoke-Command can't work in the pipeline like that. I wonder if Joel wrote his own version of Invoke-Command that does support pipeline parameters - it actually makes some sense to support.

$Global:VcsPromptStatuses = @()
}

function Global:Write-VcsStatus { $Global:VcsPromptStatuses | foreach { & $_ } }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. I can't imagine how I left in my Invoke-Command version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants