Skip to content

Document all capabilities of the browse command #5352

Closed

Description

@ahmetb

CLI Feedback

What was confusing or gave you pause?

My hands keep typing gh repo browse because presumably the repo-related
commands are grouped under gh repo sub-command.

However, the browse subcmd is a root level subcmd. The reasoning is somewhat
unclear to me. If you decide to rework this, hopefully this provides a data
point.

Activity

  1. changed the title [-]root 'browse' command ideally should be under 'repo' subcommand[/-] [+]Root-level 'browse' command ideally should be under 'repo' subcommand[/+] on Mar 24, 2022
  2. mislav commented on Mar 25, 2022

    @mislav
    Contributor

    Hi, thanks for the feedback!

    An argument could be made for browse to be under repo, but the browse command is useful not just to browse the repository home page, but also for files, issues, pull requests, wikis, and so on. Our gh issue and gh pr commands aren't under repo (even though Issues and Pull Request technically are always under a Repository), and because browse encompasses all those items, we've felt like it should also be a top-level command. It's also much shorter to type that way.

  3. ahmetb commented on Mar 25, 2022

    @ahmetb
    Author

    Then the command description is not up to date regarding the ability to open files/issues/PRs etc.

    https://cli.github.com/manual/gh_browse

  4. mislav commented on Mar 28, 2022

    @mislav
    Contributor

    Ah, good point! I agree that the docs are lacking. There is this example:

    $ gh browse 217
    #=> Open issue or pull request 217
    

    But this capability should be noted in prose above as well. I will reopen and relabel this issue to be a request to improve documentation.

  5. reopened this on Mar 28, 2022
  6. added and removed on Mar 28, 2022
  7. changed the title [-]Root-level 'browse' command ideally should be under 'repo' subcommand[/-] [+]Document all capabilities of the browse command[/+] on Mar 28, 2022
  8. bunnymatic commented on Jan 9, 2024

    @bunnymatic

    Hi

    I'm just moving away from hub and found the browse doesn't act like hub and would love it if it did.

    hub browse will navigate to the branch you're on which means I can do

    gh pr create
    hub browse
    

    and quickly submit the PR and then open the web view so I can add screenshots or read what I just submitted and review or whatever.

    But if I

    gh pr create
    gh browse
    

    I just get to the repo main so then I need more clicks and whatever to navigate to the thing I just put up.

    I see that there is a way to gh browse <args> that might get me to the PR but then I have to find those args.

    Have you considered gh browse going to the the repo and the branch based on where you are on in the terminal?

    Quick add - love much of the gh cli so far. but I still want hub around for that one little trick.

  9. bunnymatic commented on Mar 1, 2024

    @bunnymatic

    well, I just found the replacement.

    gh pr view --web
    

    so I guess I don't really need the browse.

  10. added a commit that references this issue on Dec 6, 2024
  11. added a commit that references this issue on Dec 21, 2024
  12. Bruss62 commented on Jan 6, 2025

    @Bruss62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsgh-browserelating to the gh browse command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions