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) {