From 6a41a88a0c5016711fac3615550b97a924db724d Mon Sep 17 00:00:00 2001 From: phwt <28344318+phwt@users.noreply.github.com> Date: Fri, 12 Aug 2022 16:55:21 +0700 Subject: [PATCH] docs: update README and manual --- README.md | 2 +- git-open.1.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f6834b..1a8b74f 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Please provide examples of the URLs you are parsing with each PR. ### Testing: -You'll need to install [bats](https://github.com/sstephenson/bats#installing-bats-from-source), the Bash automated testing system. It's also available as `brew install bats` +You'll need to install [bats](https://github.com/bats-core/bats-core), the Bash automated testing system. It's also available as `brew install bats-core` ```sh git submodule update --init # pull in the assertion libraries diff --git a/git-open.1.md b/git-open.1.md index 5c63db3..c9a5277 100644 --- a/git-open.1.md +++ b/git-open.1.md @@ -23,6 +23,9 @@ git hosting services are supported. it will open the webpage with that issue. See `EXAMPLES` for more information. This only works on GitHub, GitLab, Visual Studio Team Services and Team Foundation Server at the moment. +`-d`, `--default-branch` + Open the repository as if you were in the default branch (`master`/`main`) + `-s`, `--suffix` some_suffix Append the given suffix to the url @@ -59,6 +62,13 @@ git open --issue If branches use naming convention of `issues/#123`, it opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/issues/123 + +```sh +git open --default-branch +``` + +It won't suffix the url with `/tree/CURRENT_BRANCH` even if you aren't currently on `master` or `main` branch, it opens https://github.com/TRACKED_REMOTE_USER/CURRENT_REPO/ + ```sh git open --suffix pulls ```