This release is 2 versions behind 1.1.6 — the latest version of @lambdalisue/git-browse. Jump to latest
@lambdalisue/git-browse@1.1.3Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
🦕 Deno library and CLI to browse hosting service webpages of the repository
This package works with Deno
JSR Score
76%
Published
6 months ago (1.1.3)
git-browse
Open the URL of the hosting service for the repository using the system web browser. The following hosting services are currently supported:
- GitHub (https://github.com)
- GitLab (https://gitlab.com)
- Bitbucket (https://bitbucket.org)
See ./hosting_service/services and create a PR to support more hosting services.
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.
Built and signed on
View transparency logGitHub Actions
Add Package
deno add jsr:@lambdalisue/git-browse
Import symbol
import * as mod from "@lambdalisue/git-browse";
---- OR ----
Import directly with a jsr specifier
import * as mod from "jsr:@lambdalisue/git-browse";