Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename Coalesce-Args to Invoke-NullCoalescing

PowerShell complains if modules export invalid verbs
  • Loading branch information...
commit c3147d035edf19abe8d3c54dbc5a080a273ee71e 1 parent 82d3c7e
@dahlbyk authored
Showing with 10 additions and 5 deletions.
  1. +2 −2 GitUtils.ps1
  2. +2 −2 Utils.ps1
  3. +6 −1 posh-git.psm1
View
4 GitUtils.ps1
@@ -45,9 +45,9 @@ function Get-GitBranch($gitDir = $(Get-GitDirectory), [Diagnostics.Stopwatch]$sw
$r = '|BISECTING'
}
- $b = Coalesce-Args `
+ $b = Invoke-NullCoalescing `
{ dbg 'Trying symbolic-ref' $sw; git symbolic-ref HEAD 2>$null } `
- { '({0})' -f (Coalesce-Args `
+ { '({0})' -f (Invoke-NullCoalescing `
{ dbg 'Trying describe' $sw; git describe --exact-match HEAD 2>$null } `
{
dbg 'Falling back on parsing HEAD' $sw
View
4 Utils.ps1
@@ -1,6 +1,6 @@
# General Utility Functions
-function Coalesce-Args {
+function Invoke-NullCoalescing {
$result = $null
foreach($arg in $args) {
if ($arg -is [ScriptBlock]) {
@@ -13,7 +13,7 @@ function Coalesce-Args {
$result
}
-Set-Alias ?? Coalesce-Args -Force
+Set-Alias ?? Invoke-NullCoalescing -Force
function Get-LocalOrParentPath($path) {
$checkIn = Get-Item .
View
7 posh-git.psm1
@@ -13,7 +13,11 @@ Pop-Location
if (!$Env:HOME) { $Env:HOME = "$Env:HOMEDRIVE$Env:HOMEPATH" }
if (!$Env:HOME) { $Env:HOME = "$Env:USERPROFILE" }
-Export-ModuleMember -Function @(
+Export-ModuleMember `
+ -Alias @(
+ '??') `
+ -Function @(
+ 'Invoke-NullCoalescing',
'Write-GitStatus',
'Write-Prompt',
'Get-GitStatus',
@@ -27,3 +31,4 @@ Export-ModuleMember -Function @(
'Update-AllBranches',
'tgit')
+
Please sign in to comment.
Something went wrong with that request. Please try again.