Skip to content

Commit

Permalink
display version with --help
Browse files Browse the repository at this point in the history
  • Loading branch information
akavel committed Oct 29, 2020
1 parent 3e81993 commit 905033d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion up.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const version = "0.3.2 (2018-12-04)"

func init() {
pflag.Usage = func() {
fmt.Fprintf(os.Stderr, `Usage: COMMAND | up [OPTIONS]
fmt.Fprint(os.Stderr, `Usage: COMMAND | up [OPTIONS]
up is the Ultimate Plumber, a tool for writing Linux pipes in a terminal-based
UI interactively, with instant live preview of command results.
Expand Down Expand Up @@ -113,6 +113,10 @@ KEYS
OPTIONS
`)
pflag.PrintDefaults()
fmt.Fprint(os.Stderr, `
HOMEPAGE: https://github.com/akavel/up
VERSION: `+version+`
`)
}
pflag.ErrHelp = errors.New("") // TODO: or something else?
}
Expand Down

0 comments on commit 905033d

Please sign in to comment.