Document relationship between host and active account

This commit is contained in:
William Martin 2024-05-01 11:14:00 +02:00
parent f2d6a8ec5c
commit 5a5b04d132
2 changed files with 7 additions and 5 deletions

View file

@ -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)

View file

@ -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 {