From 0912c908b0c93a47347d21093068feb5ca6c6255 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 31 Mar 2021 12:47:59 +0200 Subject: [PATCH] Add ghco script --- script/ghco | 10 ++++++++++ script/installvim | 2 ++ script/installvimplugins | 2 ++ script/tmuxsess | 3 +++ script/updatevimplugins | 2 ++ 5 files changed, 19 insertions(+) create mode 100755 script/ghco diff --git a/script/ghco b/script/ghco new file mode 100755 index 0000000..0c3337e --- /dev/null +++ b/script/ghco @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Select and checkout a GitHub pull request using the GitHub CLI (required) +set -e + +prid=$(gh pr list | fzf | awk '{print $1}') +if [ -z $prid ]; then + exit 0 +fi +gh pr checkout $prid diff --git a/script/installvim b/script/installvim index f289847..60aa47d 100755 --- a/script/installvim +++ b/script/installvim @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# +# Clone or update vim to $HOME/dev/vim, build and install to $HOME/local set -e mkdir -p $HOME/dev diff --git a/script/installvimplugins b/script/installvimplugins index bf4f223..a369634 100755 --- a/script/installvimplugins +++ b/script/installvimplugins @@ -1,4 +1,6 @@ #/usr/bin/env bash +# +# Install vim plugins to $HOME/.vim/pack/git-plugins/opt set -e # Special case for fzf.vim plugin file: diff --git a/script/tmuxsess b/script/tmuxsess index 477610b..39563be 100755 --- a/script/tmuxsess +++ b/script/tmuxsess @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# +# Open a new tmux session named after the current directory with a basic +# development/editing environment. set -e cwd=$(pwd) diff --git a/script/updatevimplugins b/script/updatevimplugins index 6d5fc5a..d9ce2ee 100755 --- a/script/updatevimplugins +++ b/script/updatevimplugins @@ -1,4 +1,6 @@ #/usr/bin/env bash +# +# Update vim plugins in $HOME/.vim/pack/git-plugins/opt set -e pluginhome=$HOME/.vim/pack/git-plugins