Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite menus #3

Open
johnwc opened this issue Mar 12, 2018 · 1 comment
Open

Overwrite menus #3

johnwc opened this issue Mar 12, 2018 · 1 comment

Comments

@johnwc
Copy link

johnwc commented Mar 12, 2018

If I run the script once, then edit the script by adding another menu item. It doesn't show up until I close PowerShell and re-open and run the script from a clean PowerShell.

Is there something that can be done so that if a new script is run it clears all the menus out, that or either when show menu exits it clears all the menus.

@torgro torgro added the bug label Mar 13, 2018
@torgro
Copy link
Owner

torgro commented Mar 13, 2018

hi,
Sorry for the late reply. No need to restart powershell, just unload the module with Remove-Module. Also you should be able to "edit" the menu at runtime. If you have a main-menu, use something like this:

Get-Menu -Name "menuName" | new-menuItem @newMenuItem

Moving forward I think we might need a set-menu cmdlet. I will take it into consideration, thank you.

Cheers

Tore

@torgro torgro added enhancement and removed bug labels Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants