From 9eb99e1581cadccb1d14eabbe0602b10822b35c6 Mon Sep 17 00:00:00 2001 From: "Gal @home ha" Date: Sat, 5 Feb 2022 16:44:01 -0500 Subject: [PATCH] =Fixed auto loaded code --- base.linux/profile.d/env.ps1 | 5 ++++- docker/profile.d/Docker.class.ps1 | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base.linux/profile.d/env.ps1 b/base.linux/profile.d/env.ps1 index 8fcd40d..56073a8 100644 --- a/base.linux/profile.d/env.ps1 +++ b/base.linux/profile.d/env.ps1 @@ -20,4 +20,7 @@ if( -not ( $env:SHELL_PARENT = $env:SHELL } $env:SHELL = Get-Process -Id $PID | Select-Object -ExpandProperty Path -Set-UnixCompleter -Shell $env:COMPLETION_SHELL_PREFERENCE \ No newline at end of file +Get-Command -ListImported Set-UnixCompleter -ErrorAction Ignore | + ForEach-Object { + Set-UnixCompleter -Shell $env:COMPLETION_SHELL_PREFERENCE + } diff --git a/docker/profile.d/Docker.class.ps1 b/docker/profile.d/Docker.class.ps1 index 79444d9..3720c12 100644 --- a/docker/profile.d/Docker.class.ps1 +++ b/docker/profile.d/Docker.class.ps1 @@ -37,6 +37,7 @@ class DockerNetworks { } } +if( -not (Get-Command docker-compose -ErrorAction Ignore) ) { return } class DockerComposeCommands { #: System.Management.Automation.IValidateSetValuesGenerator { static [string[]] $cachedCommands = @() static [string[]] _GetValidValues([string]$wordToComplete,[string]$subcommand,[bool]$Strict) {