Skip to content

Commit a4353ac

Browse files
author
Andy Feller
authored
Merge pull request cli#9032 from cli/9021-document-the-relationship-between-hosts-and-active-accounts-2
Document relationship between host and active account
2 parents de394ec + 4ca098b commit a4353ac

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

pkg/cmd/auth/status/status.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,14 @@ func NewCmdStatus(f *cmdutil.Factory, runF func(*StatusOptions) error) *cobra.Co
140140
cmd := &cobra.Command{
141141
Use: "status",
142142
Args: cobra.ExactArgs(0),
143-
Short: "View all accounts and authentication status",
144-
Long: heredoc.Doc(`Verifies and displays information about your authentication state.
145-
146-
This command will test your authentication state for each GitHub host that gh knows about and
147-
report on any issues.
148-
`),
143+
Short: "Display active account and authentication state on each known GitHub host",
144+
Long: heredoc.Docf(`
145+
Display active account and authentication state on each known GitHub host.
146+
147+
For each host, the authentication state of each known account is tested and any issues are included in
148+
the output. Each host section will indicate the active account, which will be used when targeting that host.
149+
To change the active account for a host, see %[1]sgh auth switch%[1]s.
150+
`, "`"),
149151
RunE: func(cmd *cobra.Command, args []string) error {
150152
if runF != nil {
151153
return runF(opts)

pkg/cmd/auth/switch/switch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewCmdSwitch(f *cmdutil.Factory, runF func(*SwitchOptions) error) *cobra.Co
4848
# Select what host and account to switch to via a prompt
4949
$ gh auth switch
5050
51-
# Switch to a specific host and specific account
51+
# Switch the active account on a specific host to a specific user
5252
$ gh auth switch --hostname enterprise.internal --user monalisa
5353
`),
5454
RunE: func(c *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)