forked from dahlbyk/posh-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
posh-git.psm1
50 lines (40 loc) · 1.39 KB
/
posh-git.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
param([switch]$NoVersionWarn = $false)
if (Get-Module posh-git) { return }
$psv = $PSVersionTable.PSVersion
if ($psv.Major -lt 3 -and !$NoVersionWarn) {
Write-Warning ("posh-git support for PowerShell 2.0 is deprecated; you have version $($psv).`n" +
"To download version 3.0, please visit https://www.microsoft.com/en-us/download/details.aspx?id=34595`n" +
"For more information and to discuss this, please visit https://github.com/dahlbyk/posh-git/issues/163`n" +
"To suppress this warning, change your profile to include 'Import-Module posh-git -Args `$true'.")
}
Push-Location $psScriptRoot
.\CheckVersion.ps1 > $null
. .\Utils.ps1
. .\GitUtils.ps1
. .\GitPrompt.ps1
. .\GitTabExpansion.ps1
. .\TortoiseGit.ps1
Pop-Location
if (!$Env:HOME) { $Env:HOME = "$Env:HOMEDRIVE$Env:HOMEPATH" }
if (!$Env:HOME) { $Env:HOME = "$Env:USERPROFILE" }
Get-TempEnv 'SSH_AGENT_PID'
Get-TempEnv 'SSH_AUTH_SOCK'
Export-ModuleMember `
-Alias @(
'??') `
-Function @(
'Invoke-NullCoalescing',
'Write-GitStatus',
'Write-Prompt',
'Get-GitStatus',
'Enable-GitColors',
'Get-GitDirectory',
'TabExpansion',
'Get-AliasPattern',
'Get-SshAgent',
'Start-SshAgent',
'Stop-SshAgent',
'Add-SshKey',
'Get-SshPath',
'Update-AllBranches',
'tgit')