summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Czapliński <czapkofan@gmail.com>2020-10-29 21:33:31 +0100
committerMateusz Czapliński <czapkofan@gmail.com>2020-10-29 21:55:56 +0100
commit905033d9c3f850fb5b89d853414360768253d03e (patch)
tree4f801e24a0a4ad7986054c9b0f5bb20b95ad664b
parent3e8199365c6a6c66b35ebccef6f5f6996c52cb01 (diff)
display version with --help
-rw-r--r--up.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/up.go b/up.go
index e6bfb41..bab0758 100644
--- a/up.go
+++ b/up.go
@@ -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.
@@ -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?
}