Skip to content

Commit 67d5268

Browse files
committed
Add default token file path to README and usage
Fixes #15
1 parent 60dfa46 commit 67d5268

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ $ stdin | gistup
1818
The github gist opens automatically in the browser.
1919
If the browser can not be opened, the URL will be displayed.
2020

21+
The token is saved in the following file and omitting the user name and password entry from next time:
22+
23+
* macOS, Linux
24+
* `~/.config/gistup/token`
25+
* Windows
26+
* `%APPDATA%\gistup\token`
27+
2128
### Options
2229

2330
* `-a`

main.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ func main() {
4747
log.SetPrefix(fmt.Sprintf("%s: ", os.Args[0]))
4848
flag.Usage = func() {
4949
fmt.Fprintf(os.Stderr, "usage: %s [-a] [-d <description>] [-insecure] [-p] [-url <api_baseurl>] <file>...\n", os.Args[0])
50-
fmt.Fprintf(os.Stderr, " stdin | %s [-a] [-d <description>] [-n <file_name>] [-p]\n", os.Args[0])
50+
fmt.Fprintf(os.Stderr, " stdin | %s [-a] [-d <description>] [-n <file_name>] [-p]\n\n", os.Args[0])
51+
fmt.Fprintln(os.Stderr, "The token is saved in the following file and omitting the user name and password entry from next time:")
52+
if runtime.GOOS == "windows" {
53+
fmt.Fprintln(os.Stderr, "%APPDATA%\\gistup\\token")
54+
} else {
55+
fmt.Fprintln(os.Stderr, "~/.config/gistup/token")
56+
}
57+
fmt.Fprintln(os.Stderr)
5158
flag.PrintDefaults()
5259
}
5360
flag.Parse()

0 commit comments

Comments
 (0)