devops-rob / target-cli

A CLI tool to manage context profiles for HashiCorp tools
Apache License 2.0
32 stars 5 forks source link

Duplicate help entries #5

Closed devops-rob closed 1 year ago

devops-rob commented 1 year ago

The help output has duplicate entries

target vault
Manage Vault context profiles.

Usage:
  target vault [command]

Available Commands:
  create      create command creates a context profile
  delete      delete removes a context profile
  delete      delete removes a context profile
  list        
  list        
  rename      rename a conext profile
  select      select a context profile
  update      Update an existing context

Flags:
  -h, --help   help for vault

Use "target vault [command] --help" for more information about a command.

In this case, its list and delete that are duplicated.

This happens for Vault, Nomad and Consul sub commands

devops-rob commented 1 year ago

I found the issue. It is duplicate init funcs with the same sub command definitions. I'll fix it in the next merge

devops-rob commented 1 year ago

Fixed in this merge

yermulnik commented 9 months ago

Can confirm issue still exists for the new installation:

> target version
Current Version: 1.0.0

> target <tab><tab>
boundary
boundary    (Manage Boundary context profiles)
completion  (Generate the autocompletion script for the specified shell)
config
config      (Configure target CLI for shell sessions)
consul
consul      (Manage consul context profiles)
help        (Help about any command)
nomad
nomad       (Manage Nomad context profiles)
terraform
terraform   (Manage Terraform context profiles)
vault
vault       (Manage Vault context profiles)
version
version     (Show current installed version of target-cli)

> target vault <tab><tab>
create
create       (create command creates a context profile)
delete
delete       (delete removes a context profile)
list
list         (list all context profiles for your chosen tool)
select
select       (select a context profile)
set-default
set-default  (set a default context profile for Vault)
update
update       (Update an existing context)
yermulnik commented 9 months ago
> fgrep -w VERSION /etc/os-release
VERSION="22.04.3 LTS (Jammy Jellyfish)"

and

> fgrep -w VERSION /etc/os-release
VERSION="19.3 (Tricia)"

ps: the latter is a bit outdated though is for the sake of example