From 9122f8a845eb30fd72462c9d99c0a22613a25562 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 17 Nov 2016 23:06:05 +0800 Subject: [PATCH] added global git command args support (#14) --- command.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command.go b/command.go index ab42ea3..43e6eea 100644 --- a/command.go +++ b/command.go @@ -13,6 +13,11 @@ import ( "time" ) +var ( + // GlobalCommandArgs global command args for external package setting + GlobalCommandArgs []string +) + // Command represents a command with its subcommands or arguments. type Command struct { name string @@ -30,7 +35,7 @@ func (c *Command) String() string { func NewCommand(args ...string) *Command { return &Command{ name: "git", - args: args, + args: append(GlobalCommandArgs, args...), } }