Permalink
Browse files

Add Start-SshAgent function, called from the example profile

  • Loading branch information...
1 parent 6798aac commit 78e4f2ca2cce42b9ac6b0a2d17119e842d249bef @dahlbyk committed Aug 19, 2011
Showing with 8 additions and 0 deletions.
  1. +5 −0 GitUtils.ps1
  2. +1 −0 posh-git.psm1
  3. +2 −0 profile.example.ps1
View
5 GitUtils.ps1
@@ -172,3 +172,8 @@ function Get-GitAliasPattern {
"(" + $aliases + ")"
}
+$startSshAgent = Get-ChildItem start-ssh-agent.sh | select -Exp FullName
+function Start-SshAgent {
+ $sh = Get-Command sh.exe -TotalCount 1 -ErrorAction SilentlyContinue
+ if ($sh) { & $sh $startSshAgent }
+}
View
1 posh-git.psm1
@@ -15,5 +15,6 @@ Export-ModuleMember -Function @(
'Get-GitDirectory',
'GitTabExpansion',
'Get-GitAliasPattern',
+ 'Start-SshAgent',
'tgit')
View
2 profile.example.ps1
@@ -44,3 +44,5 @@ function TabExpansion($line, $lastWord) {
Enable-GitColors
Pop-Location
+
+Start-SshAgent

0 comments on commit 78e4f2c

Please sign in to comment.