-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
Conversation
Could you comment on why you're leaving this just sitting here? |
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. |
👍 response, would read again. |
$Global:VcsPromptStatuses = @() | ||
} | ||
function Global:Write-VcsStatus { $Global:VcsPromptStatuses | foreach { & $_ } } | ||
|
||
function global:Write-VcsStatus { $Global:VcsPromptStatuses | Invoke-Command } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 & $_
?
There was a problem hiding this comment.
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 &.
There was a problem hiding this comment.
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 { & $_ } } |
There was a problem hiding this comment.
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.
Submitting a similar set to posh-hg -- could probably go further than this to integrate them, but this is enough for step one