]> apps.delaporte.us Git - dotfiles.git/blobdiff - Microsoft.PowerShell_profile.ps1
Changer directory if not launched somewhere specific.
[dotfiles.git] / Microsoft.PowerShell_profile.ps1
index 7a8369632609afdc3a8758979bfd629c4702dd10..3f55ac02da3d760f7b554de0ba7deabac1e34d6f 100644 (file)
@@ -24,12 +24,14 @@ if($IsWindows -eq "") {
 # Import some home grown PowerShell modules, if they are installed.
 
 $modPaths = Get-Childitem -Path "c:\src\dotfiles\psmodules"
+$modPaths += Get-Childitem -Path "c:\src\minion\psmodule"
+if($modPaths.length -eq 0){
+       Write-Host "No modules found."
+}
 $modPaths | ForEach-Object {
-#    $_ | Format-Table
-  if(Test-Path -Path $_) {
-    Import-Module $_
-    Write-Host ">> Loaded $_"
-       }
+       $fileName = $_.FullName
+       Import-Module $fileName
+       Write-Host ">> Loaded $fileName"
 }
 #}
 # $env:PSModulePath = $env:PSModulePath + ";c:\src\dotfiles\psmodules"
@@ -53,5 +55,7 @@ function Enable-PoshGit {
 New-Alias pg    Enable-PoshGit
 Write-Host "+ Type 'pg' to enable PoshGit"
 
-# cd c:\src
-#
+
+if((Get-Location).Path -eq $HOME){
+       cd c:\src
+}