Pass arguments for `mise run` interactive menu
I have a bash script which takes an argument and a mise action in .mise.toml:
[tasks."genflux"]
description = 'Generate Flux module'
run = "./Scripts/flux.sh -n $1"
I can run the action this way: mise run genflux MyModule
But is there a way to use interactive menu (using just mise run) to select the action and then pass the argument?
I don't think I would want to do this. It would require an awkward flag like mise run --args or something that feels more confusing to try to explain than is worth the value in having this
you could probably figure out a way to use fzf to make your own shell function for this task
It might look like this, without passing awkward flags to mise run itself:
[tasks."genflux"]
description = 'Generate Flux module'
args = ["arg1", "arg2"]
run = "./Scripts/flux.sh --arg $1 --arg2 $2"
I think what you're asking for is default arguments, which is planned but something that might take me a while to get around to
I apologize for being confusing. What I was asking is parameters names, not their default values. After selecting an action ditch a defined array of parameters names, mise interactive menu would ask user to input missing values (in case of interactive mode all arguments are missing lol). Like, for example, it's implemented in Fastlane.
ah this also is planned, it's part of what I'm working on with usage. That said, I have no clue when I'll be able to get to it