pulsarctl icon indicating copy to clipboard operation
pulsarctl copied to clipboard

fix: fix command aliases

Open mouchar opened this issue 2 years ago • 0 comments

Motivation

Attempt to use built-in bash completion provided by cobra package fails on invalid shell expressions. During investigation I noticed it is caused by declaring empty strings ("") as command aliases. Fortunately, command aliases are passed as variadic arguments so fix is very simple and doesn't require substantial changes.

Modifications

  • I removed pointless empty ("") aliases as they break bash completion
  • I remove aliases that are the same as primary command name
  • I aligned cmdutils.NewResourceCmd parameters in test_help.go to match call parameters in their respective Command functions.

Verifying this change

  • [ ] Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below.

Need to update docs?

  • [ ] doc-required

    (If you need help on updating docs, create a doc issue)

  • [x] no-need-doc

My changes do not modify logic or public command-line interface.

  • [ ] doc

    (If this PR contains doc changes)

mouchar avatar Nov 15 '23 00:11 mouchar