We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm tried to cut a corner by not describing a custom class:
Show-Menu -MenuItems @(("test1", 1), @("test2", 2)) -MenuItemFormatter { $Args[0] }
But got an exception instead
Actual Result: Exception thrown
The -MenuItems option only contains non-selectable menu-items (like separators) At C:\Program Files\WindowsPowerShell\Modules\PSMenu\0.1.8\Private\Test-MenuItemArray.ps1:9 char:5 + Throw 'The -MenuItems option only contains non-selectable menu-it ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (The -MenuItems ...ike separators):String) [], RuntimeException + FullyQualifiedErrorId : The -MenuItems option only contains non-selectable menu-items (like separators)
Expected Result Menu containing items "test1" and "test2" shown
The text was updated successfully, but these errors were encountered:
3018d72
Thank you for your report. Fixed in v0.1.9.
Note that in your case you need to use:
Show-Menu -MenuItems @(@("test1", 1), @("test2", 2)) -MenuItemFormatter { param($X) $X[0] }
Or $Args[0][0] because $Args itself is an array of arguments which contains one item.
$Args[0][0]
$Args
Sorry, something went wrong.
No branches or pull requests
I'm tried to cut a corner by not describing a custom class:
But got an exception instead
Actual Result:
Exception thrown
Expected Result
Menu containing items "test1" and "test2" shown
The text was updated successfully, but these errors were encountered: