summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authortheimpostor <sahirhoda@gmail.com>2022-02-20 10:51:51 -0600
committertheimpostor <sahirhoda@gmail.com>2022-02-20 10:51:51 -0600
commitadb268e817208791d38fdc16900749224d8ad57e (patch)
treec7ca7c8317baf23276c167b0f9f8faf35061c774 /main.go
parent781870889c9223c0654f79b184395378aec783fe (diff)
update usage and readme
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/main.go b/main.go
index 7df77f6..e0514bd 100644
--- a/main.go
+++ b/main.go
@@ -8,6 +8,7 @@ import (
"io"
"log"
"os"
+ "strings"
)
func encode(fname string, encoder io.WriteCloser) {
@@ -33,10 +34,12 @@ func main() {
var fnames []string
flag.Usage = func() {
- fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s [file1 [...fileN]]\n", os.Args[0])
- fmt.Fprintf(flag.CommandLine.Output(), "Copies input to system clipboard using an OSC52 escape sequence.\n")
- fmt.Fprintf(flag.CommandLine.Output(), "Multiple files will be concatenated.\n")
- fmt.Fprintf(flag.CommandLine.Output(), "With no file arguments, will read from stdin\n")
+ template := `
+Usage:
+%s [file1 [...fileN]]
+Copies file contents to system clipboard using the ANSI OSC52 escape sequence.
+With no arguments, will read from stdin.`
+ fmt.Fprintf(flag.CommandLine.Output(), strings.TrimSpace(template), os.Args[0])
}
flag.Parse()