Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit c427ded

Browse files
committed
Merge pull request #358 from ahmetalpbalkan/usage-string-short
Print only base binary name in usage string (win)
2 parents 63bf6b5 + 1a24269 commit c427ded

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ func config() (*flag.FlagSet, error) {
178178
}
179179

180180
func usageShort() {
181-
fmt.Fprintf(os.Stderr, "Usage: %s [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [<args>]\n", os.Args[0])
181+
binName := filepath.Base(os.Args[0])
182+
fmt.Fprintf(os.Stderr, "Usage: %s [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [<args>]\n", binName)
182183
}
183184

184185
func usageLong(flags *flag.FlagSet) {

0 commit comments

Comments
 (0)