X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/7f8534a0ad54e854ab4d70b0bd45e2c05369aece..abad046ac1efb5b352b0eaddfd17bd66cbef7f68:/Microsoft.PowerShell_profile.ps1?ds=sidebyside diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index 7a83696..8d8692c 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -21,15 +21,18 @@ if($IsWindows -eq "") { # $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\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" @@ -40,8 +43,11 @@ Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 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 +# Add Minion to path +Write-Host "+ Added minion command to path." +$ENV:PATH+=";c:\src\minion\go" # Flag to ensure my profile kicked in. # Unix dies hard. New-Alias which get-command @@ -53,5 +59,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 +}