cobra icon indicating copy to clipboard operation
cobra copied to clipboard

fix: don't remove flag value that matches subcommand name

Open brianpursley opened this issue 2 years ago • 0 comments

When the command searches args to find the arg matching a particular subcommand name, it needs to ignore flag values, as it is possible that the value for a flag might match the name of the sub command.

This change improves argsMinusFirstX() to ignore flag values when it searches for the X to exclude from the result.

Fixes #1777

brianpursley avatar Aug 19 '22 22:08 brianpursley