aboutsummaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-30 17:59:13 +0200
committerJakob Unterwurzacher2017-05-30 17:59:13 +0200
commitdf2f4b1c40dec4a9996fd07cc7db1f2c82afbb7c (patch)
tree6d0ec1e3915f98a8318ffbfafa78cef9ece93b87 /cli_args.go
parent9a217ce786581ee7ec18b27e46f0096763c85f9e (diff)
main: add short help text
We have accumulated so many options over time that they no longer fit on the screen. Display only a useful subset of options to the user unless they pass "-hh".
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli_args.go b/cli_args.go
index be6d688..eb844e1 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -20,7 +20,7 @@ type argContainer struct {
debug, init, zerokey, fusedebug, openssl, passwd, fg, version,
plaintextnames, quiet, nosyslog, wpanic,
longnames, allow_other, ro, reverse, aessiv, nonempty, raw64,
- noprealloc, speed, hkdf, serialize_reads, forcedecode bool
+ noprealloc, speed, hkdf, serialize_reads, forcedecode, hh bool
masterkey, mountpoint, cipherdir, cpuprofile, extpass,
memprofile, ko, passfile, ctlsock, fsname string
// Configuration file name override
@@ -94,7 +94,7 @@ func parseCliOpts() (args argContainer) {
var opensslAuto string
flagSet = flag.NewFlagSet(tlog.ProgramName, flag.ContinueOnError)
- flagSet.Usage = usageText
+ flagSet.Usage = helpShort
flagSet.BoolVar(&args.debug, "d", false, "")
flagSet.BoolVar(&args.debug, "debug", false, "Enable debug output")
flagSet.BoolVar(&args.fusedebug, "fusedebug", false, "Enable fuse library debug output")
@@ -125,6 +125,7 @@ func parseCliOpts() (args argContainer) {
flagSet.BoolVar(&args.serialize_reads, "serialize_reads", false, "Try to serialize read operations")
flagSet.BoolVar(&args.forcedecode, "forcedecode", false, "Force decode of files even if integrity check fails."+
" Requires gocryptfs to be compiled with openssl support and implies -openssl true")
+ flagSet.BoolVar(&args.hh, "hh", false, "Show this long help text")
flagSet.StringVar(&args.masterkey, "masterkey", "", "Mount with explicit master key")
flagSet.StringVar(&args.cpuprofile, "cpuprofile", "", "Write cpu profile to specified file")
flagSet.StringVar(&args.memprofile, "memprofile", "", "Write memory profile to specified file")
@@ -145,7 +146,7 @@ func parseCliOpts() (args argContainer) {
flagSet.BoolVar(&dummyBool, "nosuid", false, ignoreText)
flagSet.BoolVar(&dummyBool, "nodev", false, ignoreText)
var dummyString string
- flagSet.StringVar(&dummyString, "o", "", "For compatibility, all options can be also passed as a comma-separated list to -o.")
+ flagSet.StringVar(&dummyString, "o", "", "For compatibility with mount(1), options can be also passed as a comma-separated list to -o on the end.")
// Actual parsing
err = flagSet.Parse(os.Args[1:])
if err == flag.ErrHelp {