syncthing/cmd/syncthing/cli
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
..
client.go cmd/syncthing: Improve "cli debug file" handling 2021-06-05 11:19:02 +02:00
config.go cmd/syncthing: Don't fail early on api setup error (fixes 7558) (#7591) 2021-04-25 20:48:17 +01:00
debug.go cmd/syncthing: Improve "cli debug file" handling 2021-06-05 11:19:02 +02:00
errors.go cmd/syncthing: Don't fail early on api setup error (fixes 7558) (#7591) 2021-04-25 20:48:17 +01:00
index.go cmd/syncthing: Add debug commands to cli (#7503) 2021-04-22 11:14:25 +02:00
index_accounting.go cmd/syncthing: Add debug commands to cli (#7503) 2021-04-22 11:14:25 +02:00
index_dump.go cmd/syncthing: Add debug commands to cli (#7503) 2021-04-22 11:14:25 +02:00
index_dumpsize.go cmd/syncthing/cli: indexDumpSize doesn't need a heap (#8024) 2021-10-29 20:21:50 +02:00
index_idxck.go cmd/syncthing: Add debug commands to cli (#7503) 2021-04-22 11:14:25 +02:00
main.go Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
operations.go cmd/syncthing: Don't fail early on api setup error (fixes 7558) (#7591) 2021-04-25 20:48:17 +01:00
show.go cmd/syncthing: Add debug commands to cli (#7503) 2021-04-22 11:14:25 +02:00
utils.go all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00