瀏覽代碼

Add verbose mode

Alois Mahdal 11 年之前
父節點
當前提交
66f99676f2
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. 8
    1
      dotfiles/gittum/bin/sibling

+ 8
- 1
dotfiles/gittum/bin/sibling 查看文件

46
         | perl -pe "s|[^/]+$|$1|;"
46
         | perl -pe "s|[^/]+$|$1|;"
47
 }
47
 }
48
 
48
 
49
+think() {
50
+    $verbose && echo "$@"
51
+}
49
 
52
 
50
 ## initz
53
 ## initz
51
 #
54
 #
68
             sibling=$2
71
             sibling=$2
69
             shift 2
72
             shift 2
70
             ;;
73
             ;;
74
+        -v|--verbose)
75
+            verbose=true
76
+            shift
77
+            ;;
71
         "")
78
         "")
72
             break
79
             break
73
             ;;
80
             ;;
89
 new_remote=$(rewrite_uri_to $project)
96
 new_remote=$(rewrite_uri_to $project)
90
 popd >/dev/null
97
 popd >/dev/null
91
 
98
 
92
-echo \'git clone $new_remote\'
99
+think \'git clone $new_remote\'
93
 git clone $new_remote
100
 git clone $new_remote