From 0f5d2aed0aef023fc10d618895f978ec836cb830 Mon Sep 17 00:00:00 2001 From: William Martin Date: Mon, 18 Mar 2024 17:24:38 +0100 Subject: [PATCH] Document auth switch behaviour for two or more accounts --- pkg/cmd/auth/switch/switch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cmd/auth/switch/switch.go b/pkg/cmd/auth/switch/switch.go index bc94ff8c4..cc2cd5b26 100644 --- a/pkg/cmd/auth/switch/switch.go +++ b/pkg/cmd/auth/switch/switch.go @@ -38,6 +38,10 @@ func NewCmdSwitch(f *cmdutil.Factory, runF func(*SwitchOptions) error) *cobra.Co This command changes the authentication configuration that will be used when running commands targeting the specified GitHub host. + If the specified host has two accounts, the active account will be switched + automatically. If there are more than two accounts, disambiguation will be + required either through the %[1]s--user%[1]s flag or an interactive prompt. + For a list of authenticated accounts you can run %[1]sgh auth status%[1]s. `, "`"), Example: heredoc.Doc(`