Complete subcommands when TraverseChildren is set #1171
The current custom completion logic does not complete subcommands when a local flag is set. This is good unless TraverseChildren is set to true where local flags can be set on parent commands. This commit allows subcommands to be completed if TraverseChildren is set to true on the root cmd. Closes spf13#1170 Signed-off-by: Paul Holzinger <email@example.com>
The current bash completion logic does not complete subcommands when a local flag is set. There is also a bug where subcommands are sometimes still getting completed. see: spf13#1172 If TraverseChildren is true we should allow subcommands to be completed even if a local flag is set. Closes spf13#1172 Signed-off-by: Paul Holzinger <firstname.lastname@example.org>
@jpmcb I run into this while working on containers/podman#6442. Podman has a local flag called
Unfortunately podman is not easy to set up. Therefore I can create a simple example program for you if you want to test it.
@jpmcb Try this with TraverseChildren true and false on the root cmd and do something like this