If a powershell function is wrapping a python function, so long as no param block is specified, its possible to easily pass all arbitrary args through with $args:
Function scl-hython {
& "$pythonDir\python.exe" myscript.py --some-arg hython $args
}
However as soon as I specify a param block (with multiple optional non positional paramaters), extra arbitrary args are no longer allowed and you will get an error like this:
A positional parameter cannot be found that accepts argument
Is there a way to enable arbitrary args and explicit ones for the sake of autocompletion?
I should also clarify, I am using multiple non positional parameters that are optional, and this case doesn't seem to be covered in existing similar answers.