File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1- # ` rbs ` - A recent branch selector for git
1+ # ` git- rbs` - A recent branch selector for git
22
3- Type ` rbs ` to see your latest local git branches, use you arrow keys to select a branch, hit enter to switch branches
3+ Type ` git r ` to see your latest local git branches, use you arrow keys to select a branch, hit enter to switch branches
44
55## Prerequisites
66
@@ -9,7 +9,7 @@ You must have `git` installed
99
1010## Usage
1111
12- Use the command ` rbs ` in any git enabled folder
12+ Use the command ` git r ` in any git enabled folder
1313
1414
1515### Installation
Original file line number Diff line number Diff line change 11package main
22
33import (
4- "github.com/bubunyo/rbs"
4+ rbs "github.com/bubunyo/git- rbs"
55)
66
77func main () {
Original file line number Diff line number Diff line change 1- module github.com/bubunyo/rbs
1+ module github.com/bubunyo/git- rbs
22
33go 1.18
44
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ execute() {
1616 srcdir=" ${tmpdir} "
1717 (cd " ${tmpdir} " && untar " ${TARBALL} " )
1818 install -d " ${BINDIR} "
19- for binexe in " rbs" ; do
19+ for binexe in " git- rbs" ; do
2020 if [ " $OS " = " windows" ]; then
2121 binexe=" ${binexe} .exe"
2222 fi
@@ -25,6 +25,10 @@ execute() {
2525 done
2626}
2727
28+ set_git_shortcut () {
29+ git config --global alias.r ' !/usr/local/bin/$BINARY'
30+ }
31+
2832is_supported_platform () {
2933 platform=$1
3034 found=1
@@ -221,10 +225,10 @@ hash_sha256_verify() {
221225 fi
222226}
223227
224- PROJECT_NAME=" rbs"
228+ PROJECT_NAME=" git- rbs"
225229OWNER=bubunyo
226- REPO=" rbs"
227- BINARY=rbs
230+ REPO=" git- rbs"
231+ BINARY=git- rbs
228232FORMAT=tar.gz
229233OS=$( uname_os)
230234ARCH=$( uname_arch)
@@ -239,7 +243,6 @@ check_platform
239243
240244tag_to_version
241245
242-
243246echo " found version: ${VERSION} for ${TAG} /${OS} /${ARCH} "
244247
245248NAME=${PROJECT_NAME} _${VERSION} _${OS} _${ARCH}
@@ -249,3 +252,5 @@ CHECKSUM=${PROJECT_NAME}_${VERSION}_checksums.txt
249252CHECKSUM_URL=${GITHUB_DOWNLOAD} /${TAG} /${CHECKSUM}
250253
251254execute
255+
256+ set_git_shortcut
You can’t perform that action at this time.
0 commit comments