dahlbyk/posh-git — comment on commit 36d61ca85cd6e241b8cd8068eb45699dc40101e7
File:  line 0
By chaliy:

In PsGet I also using similar technic to modify TabExpansion from module. However I am concerned of what situation when module is unloaded with Remove-Module? TabExpansion will remain changed. This always occurs when PsGet updates module. It forces it to reload. I am trying to revert it back in $Module.OnRemove event. But this will make things even worth if something already changed TabExpansion.

Idea that you use with Prompt seems to be much more reliable. If everybody can agree on common name of the global variable that will keep all prompts and remove them in $Module.OnRemove event, looks quite promising.

What do you think?