oldwinter / oldwinter/all-cli

体验:all-cli gh use 缺 hostname/user 只报 required flag,不说 list

Open Beginner friendly
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1
Forks
0
Avg merge
7d 23h
Merged PRs (30d)
24

Description

User path

README documents:

all-cli gh list --json
all-cli gh use --hostname github.com --user <login>

A person who found all-cli gh from --help often tries the switch command first:

all-cli gh use
all-cli gh use --hostname github.com

Friction

Cobra prints:

Error: required flag(s) "hostname", "user" not set

That names the flags and then stops. It does not say where to read a host/login pair, and all-cli gh use --help has no example. all-cli gh list already prints hosts and accounts. The other context-switch commands (kubectl use, docker use, glab use, argocd use) now point at list when args are missing. gh use still does not.

Suggested change

When --hostname or --user is missing, return a usage line that includes the list command, for example:

want gh use --hostname <host> --user <login> (example: all-cli gh list)

Put the same example on all-cli gh use --help.

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

Start with the all-cli gh use and all-cli gh use --help entry points, then compare them with kubectl use, docker use, glab use, and argocd use, which already point to list. Verify the missing-flag path and help output; done means both mention the host/login format and all-cli gh list as the source of available pairs.

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
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.