]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - files/Microsoft.PowerShell_profile.ps1
Update to selectively load my PowerShell modules
[dotfiles.git] / files / Microsoft.PowerShell_profile.ps1
index 8f1c88b89bb2ebf237f1bf407ab7b8f8da80f3c7..d868417ce490dfa11123cba4ac06b7887af4ea13 100644 (file)
@@ -26,6 +26,7 @@ if($IsWindows){
        $ENV:PATH+=";$env:src\flutter\bin" # Flutter for Dart
 }
 else {
+       $ENV:PATH+=";$env:src/bin" # anything else I need
        $ENV:PATH+=":$HOME/x16/x16-emulator" # x16 Emulator
        $ENV:PATH+=":$HOME/src/x16-demo/tools" # x16 python tools
 }
@@ -57,11 +58,14 @@ if($IsWindows){
 if($modPaths.length -eq 0){
        Write-Host "No modules found."
 }
+$enabledMods = 'dash.psm1','docker.psm1';
 $modPaths | ForEach-Object {
        $fileName = $_.FullName
-       if($filename -Like "*.psm1") {
-               Import-Module $fileName
-               Write-Host ">> Loaded $fileName"
+       if($enabledModules -Contains $_.Name ){
+               if($filename -Like "*.psm1") {
+                       Import-Module $fileName
+                       Write-Host ">> Loaded $fileName"
+               }
        }
 }