mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
parent
821d51da13
commit
d7032fe57f
1 changed files with 5 additions and 0 deletions
5
main.go
5
main.go
|
@ -46,6 +46,10 @@ var (
|
|||
SilenceErrors: false,
|
||||
SilenceUsage: true,
|
||||
TraverseChildren: true,
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
ValidArgsFunction: func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveDefault
|
||||
},
|
||||
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
|
||||
return validateOptions(cmd)
|
||||
},
|
||||
|
@ -360,6 +364,7 @@ func init() {
|
|||
Version = "unknown (built from source)"
|
||||
}
|
||||
rootCmd.Version = Version
|
||||
rootCmd.InitDefaultCompletionCmd()
|
||||
|
||||
// "Glow Classic" cli arguments
|
||||
rootCmd.PersistentFlags().StringVar(&configFile, "config", "", fmt.Sprintf("config file (default %s)", defaultConfigFile()))
|
||||
|
|
Loading…
Reference in a new issue