You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to avoid turning this on automatically, or selectively enabling / disabling it?
I see the Start-HumpCompletion and Stop-HumpCompletion, but they seem to only set the value of $Global:HumpCompletionEnabled (a variable which is also set to $true by default at the end of loading the module), but I don't see that variable referenced elsewhere.
Because this must work by replacing TabExpansion2 I'm wondering if there's a way I can better control that this gets enabled, and a way to disable it explicitly.
This is of most concern because of module auto-loading, which can be triggered by many things, and because the ideal of way of installing this (Install-Module) is going to put it in an auto-loading capable place.
It's of course possible to Save-Module and put it somewhere locally, but this means breaking out of using the standard way of managing modules.
For me, ideally, this functionality is disabled by default, and you must explicitly call Start-HumpCompletion to replace TabExpansion2. This can then go into the appropriate $PROFILE based on who wants it to be loaded automatically in their session.
Advantages
Proper module management (the module can be kept global and allowed to use for anyone who wants to)
Can be loaded in profiles giving control over different environments, at different scopes (admin can enabled everywhere, individuals can enable / disable at will, etc.).
Can be avoided in scheduled tasks and other invocations regardless of profile by invoking powershell.exe -NoProfile
Last time I tested this, Install-Module wasn't sufficient to get the posh-HumpCompletion behaviour, I had to also add it to my $PROFILE. Are you seeing a different behaviour?
I'm currently testing an update to posh-HumpCompletion by spawning a new PowerShell session using powershell -NoProfile as you described and then explicitly loading the module from my dev folder.
Is there a way to avoid turning this on automatically, or selectively enabling / disabling it?
I see the
Start-HumpCompletion
andStop-HumpCompletion
, but they seem to only set the value of$Global:HumpCompletionEnabled
(a variable which is also set to$true
by default at the end of loading the module), but I don't see that variable referenced elsewhere.Because this must work by replacing
TabExpansion2
I'm wondering if there's a way I can better control that this gets enabled, and a way to disable it explicitly.This is of most concern because of module auto-loading, which can be triggered by many things, and because the ideal of way of installing this (
Install-Module
) is going to put it in an auto-loading capable place.It's of course possible to
Save-Module
and put it somewhere locally, but this means breaking out of using the standard way of managing modules.For me, ideally, this functionality is disabled by default, and you must explicitly call
Start-HumpCompletion
to replaceTabExpansion2
. This can then go into the appropriate$PROFILE
based on who wants it to be loaded automatically in their session.Advantages
powershell.exe -NoProfile
Add-PoshGitToProfile
)Looking forward to hearing your thoughts.
The text was updated successfully, but these errors were encountered: