From 28cbfc4aab369f7f6b665979bccf846a5023ccd1 Mon Sep 17 00:00:00 2001 From: wrslatz <20246633+wrslatz@users.noreply.github.com> Date: Fri, 3 Sep 2021 12:18:24 -0400 Subject: [PATCH] Document installing extensions using full repo URL --- pkg/cmd/extension/command.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/cmd/extension/command.go b/pkg/cmd/extension/command.go index 0ea822e8c..8f983c5a3 100644 --- a/pkg/cmd/extension/command.go +++ b/pkg/cmd/extension/command.go @@ -69,6 +69,20 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command { &cobra.Command{ Use: "install ", Short: "Install a gh extension from a repository", + Long: heredoc.Doc(` + GitHub CLI extensions are installed from a repository. + + The argument accepts the short form of the repo ("owner/repo") or the + full repository URL. If the full repository URL is not used, gh will install + the extension using the hostname to which gh is currently authenticated. + + Using the full repository URL allows GitHub Enterprise users to install + extensions from public GitHub. + + Examples: + gh extension install owner/repo + gh extension install https://github.com/owner/repo + `), Args: cmdutil.MinimumArgs(1, "must specify a repository to install from"), RunE: func(cmd *cobra.Command, args []string) error { if args[0] == "." {