Last active
March 7, 2019 16:12
-
-
Save FGtatsuro/ebe3036cf71011a7ec263beb6f591db6 to your computer and use it in GitHub Desktop.
Peco utility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BRANCH=`git branch --format "%(refname:short)" | grep -v master | peco`; git push origin $BRANCH:$BRANCH && hub pull-request | |
git status --short | awk '{if ($1 ~ /M/) print $2}' | peco | xargs git add | |
git status --short | awk '{if ($1 ~ /(M|??)/) print $2}' | peco | xargs git add | |
git status --short | awk '{if ($1 ~ /(M|D|\?\?)/) print $2}' | peco | xargs git add | |
BRANCH=`git branch | awk -v ORS='' '{print $2}'`; \ | |
git checkout master; \ | |
hub pr list -f '%U' | peco | hub merge - && \ | |
git push origin master && git branch -D $BRANCH && git push origin :$BRANCH | |
BRANCH=`git branch --format "%(refname:short)" | grep -v master | peco`; \ | |
git checkout master && hub merge `hub pr list -f '%U' | peco` && \ | |
git push origin master && git branch -D $BRANCH && git push origin :$BRANCH | |
cd ~/repos/`ls ~/repos | peco` | |
D=`ls ~/repos | peco`; if [ -n "$D" ]; then cd ~/repos/$D; fi | |
find provision/ -name '*yml' | peco | xargs -o vi (-oを忘れてターミナルが崩れた場合、resetコマンドを実行) | |
ssh -F inventory/aws/ssh_config/config `awk -F'=' '/ansible_host/{print$2}' inventory/aws/buildenv | peco` | |
$ cat inventory/aws/buildenv | |
[buildenv] | |
cluster-server1 ansible_host=cluster-server-01.qa-fullplate.internal.com | |
cluster-server2 ansible_host=cluster-server-02.qa-fullplate.internal.com | |
cluster-server3 ansible_host=cluster-server-03.qa-fullplate.internal.com | |
cluster-client1 ansible_host=cluster-client-01.qa-fullplate.internal.com | |
cluster-client2 ansible_host=cluster-client-02.qa-fullplate.internal.com | |
cluster-client3 ansible_host=cluster-client-03.qa-fullplate.internal.com | |
open "https://github.com/<org>/<repos>/issues/new?template=`ls .github/ISSUE_TEMPLATE/ | peco`" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment