v0.4.0
🦕 Deno library and CLI to browse hosting service webpages of the repository
Attributes
Includes Deno configuration
Repository
Current version released
11 months ago
git-browse
Open the URL of the hosting service for the repository using the system web browser.
Usage
$ browse
#=> Opens a tree page of the current working directory in the HEAD commit of the current branch
$ browse --path=README.md
#=> Opens a blob page of README.md in the HEAD commit of the current branch
$ browse --path=README.md:10
#=> Opens a blob page of README.md with line 10 in the HEAD commit of the current branch
$ browse --path=README.md:10:20
#=> Opens a blob page of README.md with lines 10 to 20 in the HEAD commit of the current branch
$ browse --path=README.md my-awesome-branch
#=> Opens a blob page of README.md in the HEAD commit of my-awesome-branch branch
$ browse --path=README.md fd28fa8
#=> Opens a blob page of README.md in the fd28fa8 commit
$ browse --home
#=> Opens the home page of the repository
$ browse --commit
#=> Opens a commit page of the current branch
$ browse --commit my-awesome-branch
#=> Opens a commit page of my-awesome-branch branch
$ browse --commit fd28fa8
#=> Opens a commit page of fd28fa8 commit
$ browse --pr
#=> Opens a pull request page that contains the HEAD commit of the current branch
$ browse --pr my-awesome-branch
#=> Opens a pull request page that contains the HEAD commit of my-awesome-branch branch
$ browse --pr fd28fa8
#=> Opens a pull request page that contains the fd28fa8 commit
Install
As a git alias
Add the followings to your .gitconfig
[alias]
browse = "!deno run --allow-net --allow-run --allow-read https://deno.land/x/git_browse/bin/browse.ts"
Then use it as git browse
like
$ git browse --help
As an isolated command
Use deno install
command to install the command.
$ deno install --allow-net --allow-run --allow-read https://deno.land/x/git_browse/bin/browse.ts
Then use it as browse
like
$ browse --help
License
The code follows MIT license written in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.