diff --git a/pkg/cmd/alias/alias.go b/pkg/cmd/alias/alias.go index 713e7d1db..d91b4dc2d 100644 --- a/pkg/cmd/alias/alias.go +++ b/pkg/cmd/alias/alias.go @@ -14,11 +14,11 @@ func NewCmdAlias(f *cmdutil.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "alias ", Short: "Create command shortcuts", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Aliases can be used to make shortcuts for gh commands or to compose multiple commands. - Run "gh help alias set" to learn more. - `), + Run %[1]sgh help alias set%[1]s to learn more. + `, "`"), } cmdutil.DisableAuthCheck(cmd) diff --git a/pkg/cmd/alias/imports/import.go b/pkg/cmd/alias/imports/import.go index ef2176d45..ee0457b78 100644 --- a/pkg/cmd/alias/imports/import.go +++ b/pkg/cmd/alias/imports/import.go @@ -34,7 +34,7 @@ func NewCmdImport(f *cmdutil.Factory, runF func(*ImportOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "import [ | -]", Short: "Import aliases from a YAML file", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Import aliases from the contents of a YAML file. Aliases should be defined as a map in YAML, where the keys represent aliases and @@ -49,10 +49,10 @@ func NewCmdImport(f *cmdutil.Factory, runF func(*ImportOptions) error) *cobra.Co Use "-" to read aliases (in YAML format) from standard input. - The output from the gh command "alias list" can be used to produce a YAML file + The output from %[1]sgh alias list%[1]s can be used to produce a YAML file containing your aliases, which you can use to import them from one machine to - another. Run "gh help alias list" to learn more. - `), + another. Run %[1]sgh help alias list%[1]s to learn more. + `, "`"), Example: heredoc.Doc(` # Import aliases from a file $ gh alias import aliases.yml diff --git a/pkg/cmd/extension/command.go b/pkg/cmd/extension/command.go index e8e4ecc0b..1908ed5e5 100644 --- a/pkg/cmd/extension/command.go +++ b/pkg/cmd/extension/command.go @@ -109,13 +109,13 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command { word "installed" but otherwise the order and content of the columns is the same. - This command behaves similarly to 'gh search repos' but does not + This command behaves similarly to %[1]sgh search repos%[1]s but does not support as many search qualifiers. For a finer grained search of extensions, try using: gh search repos --topic "gh-extension" - and adding qualifiers as needed. See 'gh help search repos' to learn + and adding qualifiers as needed. See %[1]sgh help search repos%[1]s to learn more about repository search. For listing just the extensions that are already installed locally, @@ -449,7 +449,7 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command { gh ext search - along with gh ext install, gh ext remove, and gh repo view. + along with %[1]sgh ext install%[1]s, %[1]sgh ext remove%[1]s, and %[1]sgh repo view%[1]s. `, "`"), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/pkg/cmd/gist/clone/clone.go b/pkg/cmd/gist/clone/clone.go index d83560f40..a18538ae3 100644 --- a/pkg/cmd/gist/clone/clone.go +++ b/pkg/cmd/gist/clone/clone.go @@ -40,15 +40,15 @@ func NewCmdClone(f *cmdutil.Factory, runF func(*CloneOptions) error) *cobra.Comm Use: "clone [] [-- ...]", Args: cmdutil.MinimumArgs(1, "cannot clone: gist argument required"), Short: "Clone a gist locally", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Clone a GitHub gist locally. A gist can be supplied as argument in either of the following formats: - by ID, e.g. 5b0e0062eb8e9654adad7bb1d81cc75f - by URL, e.g. "https://gist.github.com/OWNER/5b0e0062eb8e9654adad7bb1d81cc75f" - Pass additional 'git clone' flags by listing them after '--'. - `), + Pass additional %[1]sgit clone%[1]s flags by listing them after '--'. + `, "`"), RunE: func(cmd *cobra.Command, args []string) error { opts.Gist = args[0] opts.GitArgs = args[1:] diff --git a/pkg/cmd/issue/create/create.go b/pkg/cmd/issue/create/create.go index 577f08728..39fc21842 100644 --- a/pkg/cmd/issue/create/create.go +++ b/pkg/cmd/issue/create/create.go @@ -56,12 +56,12 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "create", Short: "Create a new issue", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Create an issue on GitHub. Adding an issue to projects requires authorization with the "project" scope. - To authorize, run "gh auth refresh -s project". - `), + To authorize, run %[1]sgh auth refresh -s project%[1]s. + `, "`"), Example: heredoc.Doc(` $ gh issue create --title "I found a bug" --body "Nothing works" $ gh issue create --label "bug,help wanted" diff --git a/pkg/cmd/issue/edit/edit.go b/pkg/cmd/issue/edit/edit.go index 53400fb63..3e85813f6 100644 --- a/pkg/cmd/issue/edit/edit.go +++ b/pkg/cmd/issue/edit/edit.go @@ -50,12 +50,12 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "edit { | }", Short: "Edit issues", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Edit one or more issues within the same repository. Editing issues' projects requires authorization with the "project" scope. - To authorize, run "gh auth refresh -s project". - `), + To authorize, run %[1]sgh auth refresh -s project%[1]s. + `, "`"), Example: heredoc.Doc(` $ gh issue edit 23 --title "I found a bug" --body "Nothing works" $ gh issue edit 23 --add-label "bug,help wanted" --remove-label "core" diff --git a/pkg/cmd/pr/create/create.go b/pkg/cmd/pr/create/create.go index 890171860..cecc32fe0 100644 --- a/pkg/cmd/pr/create/create.go +++ b/pkg/cmd/pr/create/create.go @@ -119,7 +119,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co head branch of the pull request. Disable this with %[1]s--no-maintainer-edit%[1]s. Adding a pull request to projects requires authorization with the "project" scope. - To authorize, run "gh auth refresh -s project". + To authorize, run %[1]sgh auth refresh -s project%[1]s. `, "`"), Example: heredoc.Doc(` $ gh pr create --title "The bug is fixed" --body "Everything works again" diff --git a/pkg/cmd/pr/edit/edit.go b/pkg/cmd/pr/edit/edit.go index c606ae6bb..502b1b384 100644 --- a/pkg/cmd/pr/edit/edit.go +++ b/pkg/cmd/pr/edit/edit.go @@ -47,15 +47,15 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "edit [ | | ]", Short: "Edit a pull request", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Edit a pull request. Without an argument, the pull request that belongs to the current branch is selected. Editing a pull request's projects requires authorization with the "project" scope. - To authorize, run "gh auth refresh -s project". - `), + To authorize, run %[1]sgh auth refresh -s project%[1]s. + `, "`"), Example: heredoc.Doc(` $ gh pr edit 23 --title "I found a bug" --body "Nothing works" $ gh pr edit 23 --add-label "bug,help wanted" --remove-label "core" diff --git a/pkg/cmd/root/help_topic.go b/pkg/cmd/root/help_topic.go index 7db694668..7fe88f866 100644 --- a/pkg/cmd/root/help_topic.go +++ b/pkg/cmd/root/help_topic.go @@ -21,7 +21,7 @@ var HelpTopics = []helpTopic{ { name: "mintty", short: "Information about using gh with MinTTY", - long: heredoc.Doc(` + long: heredoc.Docf(` MinTTY is the terminal emulator that comes by default with Git for Windows. It has known issues with gh's ability to prompt a user for input. @@ -31,12 +31,12 @@ var HelpTopics = []helpTopic{ - Reinstall Git for Windows, checking "Enable experimental support for pseudo consoles". - Use a different terminal emulator with Git for Windows like Windows Terminal. - You can run "C:\Program Files\Git\bin\bash.exe" from any terminal emulator to continue + You can run %[1]sC:\Program Files\Git\bin\bash.exe%[1]s from any terminal emulator to continue using all of the tooling in Git For Windows without MinTTY. - - Prefix invocations of gh with winpty, eg: "winpty gh auth login". + - Prefix invocations of gh with winpty, eg: %[1]swinpty gh auth login%[1]s. NOTE: this can lead to some UI bugs. - `), + `, "`"), }, { name: "environment", @@ -99,7 +99,7 @@ var HelpTopics = []helpTopic{ GH_PATH: set the path to the gh executable, useful for when gh can not properly determine its own path such as in the cygwin terminal. - `), + `, "`"), }, { name: "reference", diff --git a/pkg/cmd/ruleset/list/list.go b/pkg/cmd/ruleset/list/list.go index e5932d170..010fa315c 100644 --- a/pkg/cmd/ruleset/list/list.go +++ b/pkg/cmd/ruleset/list/list.go @@ -50,7 +50,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman Use the %[1]s--parents%[1]s flag to control whether rulesets configured at higher levels that also apply to the provided repository or organization should be returned. The default is true. - Your access token must have the admin:org scope to use the %[1]s--org%[1]s flag, which can be granted by running "gh auth refresh -s admin:org". + Your access token must have the admin:org scope to use the %[1]s--org%[1]s flag, which can be granted by running %[1]sgh auth refresh -s admin:org%[1]s. `, "`"), Example: heredoc.Doc(` # List rulesets in the current repository diff --git a/pkg/cmd/variable/variable.go b/pkg/cmd/variable/variable.go index 50a61f4e9..f064a81e3 100644 --- a/pkg/cmd/variable/variable.go +++ b/pkg/cmd/variable/variable.go @@ -13,10 +13,10 @@ func NewCmdVariable(f *cmdutil.Factory) *cobra.Command { cmd := &cobra.Command{ Use: "variable ", Short: "Manage GitHub Actions variables", - Long: heredoc.Doc(` + Long: heredoc.Docf(` Variables can be set at the repository, environment or organization level for use in - GitHub Actions or Dependabot. Run "gh help variable set" to learn how to get started. - `), + GitHub Actions or Dependabot. Run %[1]sgh help variable set%[1]s to learn how to get started. + `, "`"), } cmdutil.EnableRepoOverride(cmd, f)