From 8c7d5c88f68ed7c414913882f0f1c779056a1a72 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Sat, 20 Aug 2022 21:48:58 +0100 Subject: [PATCH] adding additional functions to bash_profile --- .bash_profile | 16 ++++++++++++++++ .gitignore | 1 + 2 files changed, 17 insertions(+) create mode 100644 .gitignore diff --git a/.bash_profile b/.bash_profile index 19a1672..36cf4a9 100644 --- a/.bash_profile +++ b/.bash_profile @@ -13,3 +13,19 @@ function cb() { } +function _parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} + +function monitors() { + displayplacer "id:379F6649-AFE1-4C4E-8116-12D48D540E1A res:3008x1692 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0" "id:37D8832A-2D66-02CA-B9F7-8F30A301B230 res:1512x982 hz:120 color_depth:8 scaling:on origin:(-1512,1234) degree:0" "id:88A56A42-DB0F-49F3-92D3-51743598D734 res:1692x3008 hz:30 color_depth:8 scaling:on origin:(3008,-1316) degree:90" +} + +# display git branch in the terminal prompt +export PS1='\[\e[1;91m\][\w]\[\e[0m\]\[\e[32m\]$(_parse_git_branch)\[\e[00m\]$ ' + +function new_issue_branch() { + local issueNumber=$1 + local issueDescription=$(gh issue view ${issueNumber} --repo cosmos/ibc-go --json title | jq -r .title | awk '{print tolower($0)}' | tr " " - | sed s/'[`:()]'//g) + git checkout -b "cian/issue#${issueNumber}-${issueDescription}" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea