aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-12 12:49:04 +0100
committerJakob Unterwurzacher2017-02-12 12:49:04 +0100
commit1e9d7354069d2f619ca61f8427e2c8fc701249e3 (patch)
treeac865a76a00f0a9153b989de53311dc52528fd59
parentdc2dc9f88ca918fa3d5a4ee5bd4261e70783cd83 (diff)
Document "--" to stop option parsing in help text + man page
-rw-r--r--Documentation/MANPAGE.md4
-rw-r--r--main.go3
2 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/MANPAGE.md b/Documentation/MANPAGE.md
index 63f86cf..fa275f6 100644
--- a/Documentation/MANPAGE.md
+++ b/Documentation/MANPAGE.md
@@ -201,6 +201,10 @@ Options:
: Use all-zero dummy master key. This options is only intended for
automated testing as it does not provide any security.
+**--**
+: Stop option parsing. Helpful when CIPHERDIR may start with a
+ dash "-".
+
EXAMPLES
========
diff --git a/main.go b/main.go
index 4230d94..bb47e46 100644
--- a/main.go
+++ b/main.go
@@ -48,6 +48,9 @@ Options:
`, tlog.ProgramName, tlog.ProgramName)
flagSet.PrintDefaults()
+ fmt.Print(` --
+ Stop option parsing
+`)
}
// loadConfig loads the config file "args.config", prompting the user for the password