feat: add name formatter #10

Open
bissendorf wants to merge 3 commits from feat/output-name into dev
3 changed files with 37 additions and 1 deletions
Showing only changes of commit cdd3216f46 - Show all commits

View File

@ -45,6 +45,9 @@ func initRootCmd() {
rootCmd.PersistentFlags().BoolVar(&appConfig.OutputOrderReverse, "reverse", false, "Reverses output item order") rootCmd.PersistentFlags().BoolVar(&appConfig.OutputOrderReverse, "reverse", false, "Reverses output item order")
rootCmd.PersistentFlags().BoolVar(&appConfig.PrintConfig, "print-config", false, "Enable printing the application config") rootCmd.PersistentFlags().BoolVar(&appConfig.PrintConfig, "print-config", false, "Enable printing the application config")
// Add flag completions
rootCmd.RegisterFlagCompletionFunc("output", cobra.FixedCompletions(formatters, cobra.ShellCompDirectiveNoFileComp))
// Create logger and add child commands // Create logger and add child commands
logger := jlog.New(slog.LevelDebug) logger := jlog.New(slog.LevelDebug)
ctx := jlog.ContextWith(context.Background(), logger) ctx := jlog.ContextWith(context.Background(), logger)