add -T option to gitcopy which copies commits as trello title

This commit is contained in:
hophacker 2019-07-03 03:52:25 +08:00
parent fe1a13a783
commit 8362c60937
2 changed files with 6 additions and 1 deletions

View File

@ -132,7 +132,7 @@ function init_db() {
function gitcopy() { function gitcopy() {
n=1 n=1
while getopts "c:n:t:" o; do while getopts "c:n:t:T" o; do
case "${o}" in case "${o}" in
c) c)
commit=${OPTARG} commit=${OPTARG}
@ -143,6 +143,9 @@ function gitcopy() {
t) t)
trelloCardName=${OPTARG} trelloCardName=${OPTARG}
;; ;;
T)
trelloCardName=`git log $commit --pretty="%s" | head -n $n`
;;
*) *)
usage usage
;; ;;

View File

@ -14,3 +14,5 @@ fi
for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"