mirror of https://github.com/helm/helm
Empty arguments were being swallowed by the plugin parsing logic; this commit fixes that. This was not a big problem as empty arguments are probably quite rare. However, the shell completion logic does have a use case for an empty argument. Plugins using Cobra have a '__complete' command that can be called to obtain the valid completion choices. That command takes as arguments what the user has typed. When the user has not typed anything the command needs to be passed an explicit empty argument. For example: helm 2to3 __complete '' but since the empty argument is not being passed to the plugin we get a missing argument error because the __complete command requires at least one argument. Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>pull/10656/head
parent
12f1bc0acd
commit
b8a994bd78
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo $#
|
@ -0,0 +1,4 @@
|
||||
name: numargs
|
||||
usage: "echo num args"
|
||||
description: "echo number of arguments received"
|
||||
command: "$HELM_PLUGIN_DIR/numargs.sh"
|
Loading…
Reference in new issue