Change enviroment variables are interpreted by syncthing to options

Using environment variables is nice. But why not normal program options/arguments? It is IMHO more common.

Benefit with options: syncthing can validate them and display errors if something wrong.

The guiding principle is

  1. Everything should be doable in the GUI.
  2. The stuff that isn’t suitable in the GUI anyway, but is useful to a user, should be a command line flag.
  3. Anything only used/usable by a developer goes into an environment variable.

Probably we shouldn’t even show the list of environment stuff in a regular -help invocation. The STNORESTART should maybe be a flag and the STTRACE stuff is borderline since it’s sometimes useful for non-developers… But if you look at the code organization you’ll see that having the STTRACE variable makes enabling debugging in packages that are not main a lot more convenient.

I’m not the opinion to “protect” normal users for developer stuff. Why hiding developer stuff from -help ? If the help page is too long, than maybe split it…

Really normal users (e.g. Dropbox user) didn’t know anything about command line augments :wink:

My problem here is, that i didn’t see if environment variable are used or not. Have i a typo?

Currently i use STGUIASSETS and didn’t see my changes in index.html… Is the STGUIASSETS really used? Where is my mistake?

EDIT: OK i see the [Static] Serving, so STGUIASSETS is used…