From 5a5b04d1320fcb48a51f1969253e2fa815c6d368 Mon Sep 17 00:00:00 2001 From: William Martin Date: Wed, 1 May 2024 11:14:00 +0200 Subject: [PATCH] Document relationship between host and active account --- pkg/cmd/auth/status/status.go | 10 ++++++---- pkg/cmd/auth/switch/switch.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/auth/status/status.go b/pkg/cmd/auth/status/status.go index c28c3f48e..21b867eb5 100644 --- a/pkg/cmd/auth/status/status.go +++ b/pkg/cmd/auth/status/status.go @@ -141,11 +141,13 @@ func NewCmdStatus(f *cmdutil.Factory, runF func(*StatusOptions) error) *cobra.Co Use: "status", Args: cobra.ExactArgs(0), Short: "View all accounts and authentication status", - Long: heredoc.Doc(`Verifies and displays information about your authentication state. + Long: heredoc.Docf(` + Displays information about your authentication state on each known GitHub host. - This command will test your authentication state for each GitHub host that gh knows about and - report on any issues. - `), + For each host, the authentication state of each known account is tested and any issues are included in + the output. Each host section will indicate the active account, which will be used when targeting that host. + To change the active account for a host, see %[1]sgh auth switch%[1]s. + `, "`"), RunE: func(cmd *cobra.Command, args []string) error { if runF != nil { return runF(opts) diff --git a/pkg/cmd/auth/switch/switch.go b/pkg/cmd/auth/switch/switch.go index d2aa73a9d..a01017609 100644 --- a/pkg/cmd/auth/switch/switch.go +++ b/pkg/cmd/auth/switch/switch.go @@ -48,7 +48,7 @@ func NewCmdSwitch(f *cmdutil.Factory, runF func(*SwitchOptions) error) *cobra.Co # Select what host and account to switch to via a prompt $ gh auth switch - # Switch to a specific host and specific account + # Switch the active account on a specific host to a specific user $ gh auth switch --hostname enterprise.internal --user monalisa `), RunE: func(c *cobra.Command, args []string) error {