cobra-cli icon indicating copy to clipboard operation
cobra-cli copied to clipboard

can't create cmd and subcmd with same name, it will be overwrited?

Open yushanjin opened this issue 1 year ago • 1 comments

e.g:
run cobra-cli add get, it will generate cmd/get.go run cobra-cli add config, it will generate cmd/config.go run cobra-cli add get -p 'configCmd', it will also generate cmd/get.go

the thrid command will overwrite cmd/get.go

finally, we can't have 'app get ' and 'app config get ' two commands at the same time.

yushanjin avatar Aug 17 '23 15:08 yushanjin

This is a common occurrence in the CLI development process. but still no solution.

related issues: https://github.com/spf13/cobra/issues/1131 https://github.com/spf13/cobra/issues/1059

caozhuozi avatar Apr 29 '24 02:04 caozhuozi