cobra icon indicating copy to clipboard operation
cobra copied to clipboard

The default ShellCompDirective can be customized for a command and its subcommands

Open albers opened this issue 4 days ago • 0 comments

Closes #2209, #2221

#2221 proposed a solution where the custom DefaultShellCompDirective only applied to a given command.

In https://github.com/spf13/cobra/pull/2221#discussion_r1923845125, alternative approaches were discussed. We agreed on a recursive solution, where a change applies to a command and its subcommands.

To ease review, I open a new PR for this approach.

albers avatar Feb 18 '25 11:02 albers