From 8362c60937b452a5c08f74129a13ff5fff00162c Mon Sep 17 00:00:00 2001 From: hophacker Date: Wed, 3 Jul 2019 03:52:25 +0800 Subject: [PATCH] add -T option to gitcopy which copies commits as trello title --- zsh/functions.zsh | 5 ++++- zsh/prezto-override/zshrc | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index e44bb6b..3354e32 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -132,7 +132,7 @@ function init_db() { function gitcopy() { n=1 - while getopts "c:n:t:" o; do + while getopts "c:n:t:T" o; do case "${o}" in c) commit=${OPTARG} @@ -143,6 +143,9 @@ function gitcopy() { t) trelloCardName=${OPTARG} ;; + T) + trelloCardName=`git log $commit --pretty="%s" | head -n $n` + ;; *) usage ;; diff --git a/zsh/prezto-override/zshrc b/zsh/prezto-override/zshrc index 6c6ce4e..6a8535a 100644 --- a/zsh/prezto-override/zshrc +++ b/zsh/prezto-override/zshrc @@ -14,3 +14,5 @@ fi for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"