spf13 / spf13/cobra

default completion command on "empty" project

Open
#2,016 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
44.6k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

Running the default completion command right after cobra-init results in the root help being printed.
This can be confusing for newbies.
It would be helpful to add some hint that there is nothing to complete (either in the docs or in the command output).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior by running the default completion command immediately after cobra-init. Start at the completion command and the root-help path to determine where the empty-project case is handled. Done means the command no longer leaves newcomers with unexplained root help and instead provides a clear “nothing to complete” hint, either in output or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.