Skip to content

Commit

Permalink
Fixed help statement
Browse files Browse the repository at this point in the history
  • Loading branch information
noborus committed Feb 11, 2021
1 parent 93faba4 commit 052babc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ Usage:
ov [flags]

Flags:
-C, --alternate-rows color to alternate rows
-C, --alternate-rows alternately change the line color
-i, --case-sensitive case-sensitive in search
-d, --column-delimiter string column delimiter (default ",")
-c, --column-mode column mode
--completion Generate completion script [bash|zsh|fish|powershell]
--completion generate completion script [bash|zsh|fish|powershell]
--config string config file (default is $HOME/.ov.yaml)
--debug debug mode
--disable-mouse disable mouse support
-X, --exit-write output the current screen when exiting
-H, --header int number of header rows to fix
-h, --help help for ov
--help-key display key bind information
-n, --line-number line number
-n, --line-number line number mode
-F, --quit-if-one-screen quit if the output fits on one screen
-x, --tab-width int tab stop width (default 8)
-v, --version display version information
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/rivo/uniseg v0.2.0
github.com/spf13/afero v1.5.1 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.1.1
github.com/spf13/cobra v1.1.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.5.1 // indirect
Expand All @@ -29,5 +29,4 @@ require (
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
golang.org/x/text v0.3.5 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
Expand Down Expand Up @@ -393,7 +393,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.ov.yaml)")
rootCmd.PersistentFlags().BoolVarP(&ver, "version", "v", false, "display version information")
rootCmd.PersistentFlags().BoolVarP(&helpKey, "help-key", "", false, "display key bind information")
rootCmd.PersistentFlags().BoolVarP(&completion, "completion", "", false, "Generate completion script [bash|zsh|fish|powershell]")
rootCmd.PersistentFlags().BoolVarP(&completion, "completion", "", false, "generate completion script [bash|zsh|fish|powershell]")

// Config.General
rootCmd.PersistentFlags().IntP("tab-width", "x", 8, "tab stop width")
Expand All @@ -122,13 +122,13 @@ func init() {
rootCmd.PersistentFlags().IntP("header", "H", 0, "number of header rows to fix")
_ = viper.BindPFlag("general.Header", rootCmd.PersistentFlags().Lookup("header"))

rootCmd.PersistentFlags().BoolP("alternate-rows", "C", false, "color to alternate rows")
rootCmd.PersistentFlags().BoolP("alternate-rows", "C", false, "alternately change the line color")
_ = viper.BindPFlag("general.AlternateRows", rootCmd.PersistentFlags().Lookup("alternate-rows"))

rootCmd.PersistentFlags().BoolP("column-mode", "c", false, "column mode")
_ = viper.BindPFlag("general.ColumnMode", rootCmd.PersistentFlags().Lookup("column-mode"))

rootCmd.PersistentFlags().BoolP("line-number", "n", false, "line number")
rootCmd.PersistentFlags().BoolP("line-number", "n", false, "line number mode")
_ = viper.BindPFlag("general.LineNumMode", rootCmd.PersistentFlags().Lookup("line-number"))

rootCmd.PersistentFlags().BoolP("wrap", "w", true, "wrap mode")
Expand Down

0 comments on commit 052babc

Please sign in to comment.