From 911a2f87b0878f9d6a4edea8552a8415f7e8cdf3 Mon Sep 17 00:00:00 2001 From: Masatoshi Tsushima Date: Wed, 13 Jul 2022 11:11:50 +0900 Subject: [PATCH] Remove wrapped_git --- zshrc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/zshrc b/zshrc index 0b0ab92..91b2d0c 100644 --- a/zshrc +++ b/zshrc @@ -287,28 +287,6 @@ function do_enter() { zle accept-line fi } -# git の alias では変えられない既存のコマンドの動作を変更す -function wrapped_git() { - # switch に強制する - #if [[ "$1" = "checkout" ]]; then - # echo -e "\033[1;41mUse switch or restore!\033[00m" - # push のみなのに track してなかったら set-upstream をサジェストする - if [[ "$*" = "push" ]] && in_git && ! (\git rev-parse --abbrev-ref @{upstream} >/dev/null 2>&1); then - suggest="push -u origin $(\git rev-parse --abbrev-ref HEAD)" - ask_ynae "git $suggest" - exit_code=$? - echo - case $exit_code in - "0" ) \git ${=suggest} ;; - "1" ) \git $@ ;; - "2" ) return 130 ;; - "3" ) print -z "git $@" ;; - esac - else - \git $@ - fi -} -alias git=wrapped_git ################## ## キーバインド ##