From d847e54ef8fc7e375ed6be8e62f7ce04a65d4362 Mon Sep 17 00:00:00 2001 From: John W Higgins Date: Thu, 4 Nov 2021 17:22:29 -0700 Subject: [PATCH 1/2] Allow change to specified working directory --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 3100561..0b19eba 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,7 @@ var ( flagConf string flagSequential bool flagDecoration string + flagDirectory string decoration Decoration verbose bool globalFlags = flag.NewFlagSet("", flag.ContinueOnError) @@ -71,6 +72,8 @@ func init() { Don't run multiple commands at the same time.`) globalFlags.StringVarP(&flagDecoration, "decoration", "d", "plain", ` How to decorate command output. Choices: none, plain, fancy.`) + globalFlags.StringVarP(&flagDirectory, "directory", "D", ".", ` + Set working directory.`) globalConfig.registerFlags(globalFlags) } @@ -137,6 +140,8 @@ func main() { log.Fatalf("Invalid decoration %s. Choices: none, plain, fancy.", flagDecoration) } + os.Chdir(flagDirectory) + var configs []*Config if flagConf == "" { if flagSequential { From f1d493ddd0f776e5867ea36613513cbe63fd88db Mon Sep 17 00:00:00 2001 From: John W Higgins Date: Thu, 4 Nov 2021 19:34:41 -0700 Subject: [PATCH 2/2] Add name to authors list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 68f6d7e..04b6825 100644 --- a/README.md +++ b/README.md @@ -336,3 +336,4 @@ background on this issue. * Rich Liebling ([rliebling](https://github.com/rliebling)) * Seth W. Klein ([sethwklein](https://github.com/sethwklein)) * Vincent Vanackere ([vanackere](https://github.com/vanackere)) +* John W Higgins ([wishdev](https://github.com/wishdev))