diff --git a/README.md b/README.md index b0a8032..c942da5 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,10 @@ Then run `acp --setup` to generate an identity. # sender acp path/to/files -# receiver -acp # for receiving to pwd or -acp -d path/to/dest +# receiver, to $(pwd) +acp +# or receive to/as specified target +acp -d path/to/target ``` You can run the sender and receiver in arbitrary order. diff --git a/cmd/acp/main.go b/cmd/acp/main.go index 0e0e29a..6fe32e6 100644 --- a/cmd/acp/main.go +++ b/cmd/acp/main.go @@ -14,6 +14,16 @@ import ( "github.com/contextualist/acp/pkg/tui" ) +const UsageBrief = `Usage: + # sender + acp path/to/files + + # receiver, to $(pwd) + acp + # or receive to/as specified target + acp -d path/to/target +` + var buildTag string // build-time injected var ( @@ -31,7 +41,7 @@ var exitStatement string func main() { flag.Usage = func() { - fmt.Fprintf(flag.CommandLine.Output(), "%s (%s)\nUsage:\n", os.Args[0], buildTag) + fmt.Fprintf(flag.CommandLine.Output(), "%s (%s)\n%s\nOptions:\n", os.Args[0], buildTag, UsageBrief) flag.PrintDefaults() } flag.Parse()