-
Notifications
You must be signed in to change notification settings - Fork 367
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
Custom magic command options seems to be empty in F# #959
Comments
This looks like you're hitting a common System.CommandLine gotcha. Your handler parameters will be bound based on the parameter names, so you need to have named parameters for your command handler method, e.g. |
How it should be different from commandHandler I already have?
|
Ok, I didn't notice earlier that System.Command is used. Found this issue which drove me to this working code:
|
We have an alternative proposal for setting up handlers which doesn't use name-based matching, which you can see here: dotnet/command-line-api#1012 Feel free to weigh in. |
I have my own magic command created like this:
Options seems to be registered correctly:
#!mymagicommand -h :
However inside the command handler the option parameters seems to be empty
as
#!mymagiccommand --load loader --name name
or
#!mymagiccommand --load "loader" --name "name"
results with
Any clues ? Do I use it wrongly somehow or F# is not well supported in this case?
The text was updated successfully, but these errors were encountered: