I have a command like this, and for some reason someone decided to put spaces in the arguments metavar:
internal class RunCommand : AmperSubcommand(name = "run") {
private val programArguments by argument(name = "program arguments").multiple()
// ...
}
When sourcing the generated bash completion for this, I get the following error:
-bash: /home/jbion/amper-completion.bash: line 539: syntax error near unexpected token `arguments'
-bash: /home/jbion/amper-completion.bash: line 539: ` program arguments)'
Adding quotes around program arguments in the completion script solves the problem.
I guess there are 2 ways this could be solved:
forbid spaces (and other chars that could mess up with bash) in the metavar name with an explicit doc and error
I have a command like this, and for some reason someone decided to put spaces in the arguments metavar:
When sourcing the generated bash completion for this, I get the following error:
Adding quotes around
program arguments
in the completion script solves the problem.I guess there are 2 ways this could be solved:
case