syncthing/cmd/syncthing
André Colomb 41bfb7a330
Normalize CLI options to always use two dashes. (#8037)
Consistently use double dashes and fix typos -conf, -data-dir and
-verify.

Applies also to tests running the syncthing binary for consistency.

* Fix mismatched option name --conf in cli subcommand.

According to the source code comments, the cli option flags should
mirror those from the serve subcommand where applicable.  That one is
actually called --config though.

* cli: Fix help text option placeholders.

The urfave/cli package uses the Value field of StringFlag to provide a
default value, not to name the placeholder.  That is instead done with
backticks around some part of the Usage field.

* cli: Add missing --data flag in subcommand help text.

The urfave/cli based option parsing uses a fake flags collection to
generate help texts matching the used global options.  But the --data
option was omitted from it, although it is definitely required when
using --config as well.  Note that it cannot just be ignored, as some
debug stuff actually uses the DB:

syncthing cli --data=/bar --config=/foo debug index dump
2021-11-04 08:42:55 +01:00
..
cli Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
cmdutil Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
decrypt Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
.gitignore Repair model tests 2014-03-30 21:59:40 +02:00
.stfolder Merge remote-tracking branch 'syncthing/pr/1577' 2015-04-06 20:53:32 +02:00
blockprof.go cmd/syncthing: Refactor command line parsing (#7330) 2021-02-10 20:35:37 +01:00
crash_reporting.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
crash_reporting_test.go lib/ur: Implement crash (panic) reporting (fixes #959) (#5702) 2019-06-11 08:19:11 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
heapprof.go cmd/syncthing: Refactor command line parsing (#7330) 2021-02-10 20:35:37 +01:00
main.go Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
monitor.go all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
monitor_test.go cmd/syncthing: Do not truncate/rotate logs at start (#6359) 2020-02-26 13:49:03 +01:00
openurl_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
openurl_windows.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
options_others.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
options_windows.go cmd/syncthing: Correct name of HiddenConsole flag (fixes #7446) (#7447) 2021-03-10 07:31:31 +01:00
perfstats_unix.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
perfstats_unsupported.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
traceback.go all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00