]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - Microsoft.PowerShell_profile.ps1
Checkin all the things.
[dotfiles.git] / Microsoft.PowerShell_profile.ps1
index 8b3442fab32afd904615f909d1ca5e3525223af3..7acc0d2faf00f2b2302b562f35f803bd8d4d264b 100644 (file)
@@ -21,18 +21,18 @@ if($IsWindows -eq "") {
 #      $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
 #}
 
 #      $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
 #}
 
-# Import some home grown PowerShell modules, if they are installed.
+$env:Journal = "~\Journal\2021" # allows cd $env:journal
 
 
+# Import some home grown PowerShell modules, if they are installed.
 $modPaths = Get-Childitem -Path "c:\src\dotfiles\psmodules"
 $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 {
 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"
 }
 #}
 # $env:PSModulePath = $env:PSModulePath + ";c:\src\dotfiles\psmodules"
@@ -43,8 +43,10 @@ Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
 Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 
 Set-PSReadlineOption -HistorySavePath c:\temp\PSHistory.log
 
 Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 
 Set-PSReadlineOption -HistorySavePath c:\temp\PSHistory.log
 
-# Minion commands - 'today'
+# Minion alias commands - 'today'
 . C:\src\minion\profiles\alias.ps1
 . C:\src\minion\profiles\alias.ps1
+# Add Minion go executable to path.
+. C:\src\minion\profiles\path.ps1
 
 # Unix dies hard.
 New-Alias which get-command
 
 # Unix dies hard.
 New-Alias which get-command
@@ -56,5 +58,7 @@ function Enable-PoshGit {
 New-Alias pg    Enable-PoshGit
 Write-Host "+ Type 'pg' to 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
+}