From ed93e4a57c5ca5c97bfce0d2fa1736fc04952f27 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Wed, 3 May 2023 12:54:50 +0200 Subject: [PATCH] add shortcut -H to --no-headers, it's too cumbersome to type --- cmd/root.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 9a68deb..3e09fc7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -20,13 +20,14 @@ import ( "bytes" "errors" "fmt" - "github.com/spf13/cobra" - "github.com/tlinden/tablizer/cfg" - "github.com/tlinden/tablizer/lib" "log" "os" "os/exec" "strings" + + "github.com/spf13/cobra" + "github.com/tlinden/tablizer/cfg" + "github.com/tlinden/tablizer/lib" ) func man() { @@ -105,7 +106,7 @@ func Execute() { // options rootCmd.PersistentFlags().BoolVarP(&conf.Debug, "debug", "d", false, "Enable debugging") rootCmd.PersistentFlags().BoolVarP(&conf.NoNumbering, "no-numbering", "n", false, "Disable header numbering") - rootCmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "", false, "Disable header display") + rootCmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "H", false, "Disable header display") rootCmd.PersistentFlags().BoolVarP(&conf.NoColor, "no-color", "N", false, "Disable pattern highlighting") rootCmd.PersistentFlags().BoolVarP(&ShowVersion, "version", "V", false, "Print program version") rootCmd.PersistentFlags().BoolVarP(&conf.InvertMatch, "invert-match", "v", false, "select non-matching rows")