From 964be85e6dc76340fbc22ab06db0d7e531cad8a2 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 25 May 2020 13:05:32 -0400 Subject: [PATCH] Parse subcommands before main command arguments int the CLI --- main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 363c984..acc5a8e 100644 --- a/main.go +++ b/main.go @@ -30,11 +30,12 @@ var ( width uint rootCmd = &cobra.Command{ - Use: "glow SOURCE", - Short: "Render markdown on the CLI, with pizzazz!", - SilenceErrors: false, - SilenceUsage: false, - RunE: execute, + Use: "glow SOURCE", + Short: "Render markdown on the CLI, with pizzazz!", + SilenceErrors: false, + SilenceUsage: false, + TraverseChildren: true, + RunE: execute, } )