Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parent command [cmdx] has duplicated subcommand name or alias: #1032

Closed
suzuki-shunsuke opened this issue Dec 29, 2024 · 5 comments · Fixed by #1033
Closed

parent command [cmdx] has duplicated subcommand name or alias: #1032

suzuki-shunsuke opened this issue Dec 29, 2024 · 5 comments · Fixed by #1033
Labels
bug Something isn't working

Comments

@suzuki-shunsuke
Copy link
Owner

suzuki-shunsuke commented Dec 29, 2024

Version: 1.7.5

$ cmdx -v
cmdx version 1.7.5 (a7711e90e767e8f74db734a54aa50ba83142f674)
$ cmdx help
parent command [cmdx] has duplicated subcommand name or alias:

Note

@suzuki-shunsuke suzuki-shunsuke added the bug Something isn't working label Dec 29, 2024
@suzuki-shunsuke
Copy link
Owner Author

@suzuki-shunsuke
Copy link
Owner Author

I couldn't reproduce the issue using the following config.

---
tasks:
- name: hello
  description: hello task
  script: echo hello
$ cmdx hello
+ echo hello
hello

@suzuki-shunsuke
Copy link
Owner Author

I could reproduce the issue.

tasks:
- name: foo
  script: echo foo
- name: bar
  script: echo bar
$ cmdx foo 
parent command [cmdx] has duplicated subcommand name or alias: 
$ cmdx bar
parent command [cmdx] has duplicated subcommand name or alias:

@suzuki-shunsuke
Copy link
Owner Author

suzuki-shunsuke commented Dec 29, 2024

I couldn't reproduce the issue.

tasks:
- name: foo
  script: echo foo
  short: f
- name: bar
  script: echo bar

I guess empty command aliases causes conflicts.

Aliases: []string{task.Short},

If aliases are empty, cmdx should not set them to aliases.

@suzuki-shunsuke
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant