Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add a option to disable update notifications #743

@remi-dupre

Description

@remi-dupre

Describe the feature or problem you’d like to solve

When running the completion sub-command, gh cli will check for updates and write a message if an update is available (this was suggested in #85). The expected use is to eval this command in your .bashrc or .anything_rc, this means that a information message will be written every time a prompt is opened.

While I think this feature is useful (this tool is not part of most distributions official repositories yet), I also think that it can be considered to be quite annoying and intrusive. If you installed this from a repository, this also means that you might get pointless messages for a few days until your package gets updated, this might become a very common scenario in the future.

Proposed solution

It would be nice to have a feature switch in parameters (-q, --quiet for example?) to disable update notifications. Currently no such option seem to exist:

>> gh completion -h
Generate shell completion scripts for GitHub CLI commands.

For example, for bash you could add this to your '~/.bash_profile':

	eval "$(gh completion)"

When installing GitHub CLI through a package manager, however, it's possible that
no additional shell configuration is necessary to gain completion support. For
Homebrew, see <https://docs.brew.sh/Shell-Completion>

Usage:
  gh completion [flags]

Flags:
  -s, --shell string   Shell type: {bash|zsh|fish|powershell} (default "bash")

Global Flags:
      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions