Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Conversation

zloeber
Copy link
Contributor

@zloeber zloeber commented Feb 13, 2017

This is specifically for Out-Default which never gets reverted back to the original cmdlet when the module unloads otherwise. This update should rectify the reported issue of PowerShell puking when the module is unloaded.

… rectify the borking of PowerShell when the module is unloaded
@Davlind
Copy link
Owner

Davlind commented Mar 21, 2017

Wow, this is awesome! Has this always been possible, or does is require a recent version of PS? I'm just trying to figure out why I never stumbled upon this way of doing it, back when I first wrote this.

@zloeber
Copy link
Contributor Author

zloeber commented Mar 22, 2017

It is something capable with newer versions I believe. I actually found the original code source pulled from that you used to wrap around out-default (or modify really). I think it was written in v1 code which was far more persnickity. I just recently ran into another way of accomplishing this that isn't greatly publicized here. I wish I would have found this earlier on as it actually dynamically creates modules with psxml type definitions to accomplish much the same thing without any out-default proxy craziness. In any case, I rewrote much of your code into a plugin within my ohmypsh project and linked back to your project. Hope you don't mind.

@vr8hub vr8hub merged commit 1ad2bc1 into Davlind:master Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants