code: public static ConfigSource parseMainArgs(String...args) {
          Map<String, String> result;
          if (args == null) {
              result = Collections.emptyMap();
          } else {
              result = new HashMap<>();
              String prefix = System.getProperty("main.args.prefix","");
              String key = null;
              for (String arg : args) {
                  if (arg.startsWith("--")) {
                      arg = arg.substring(2);
                      int index = arg.indexOf('=');
                      if (index > 0) {
                          key = arg.substring(0, index).trim();
                          result.put(prefix + key, arg.substring(index + 1).trim());
                          key = null;
                      } else {
                          result.put(prefix + arg, arg);
                      }
                  } else if (arg.charAt(0) == '-') {
                      key = arg.substring(1);
                  } else {
                      if (key != null) {
                          result.put(prefix + key, arg);
                          key = null;
                      } else {
                          result.put(prefix + arg, arg);
                      }
                  }
              }
          }
          return new CLIPropertySource(result);
      }
docs: Configure the main arguments, herby parsing and mapping the main arguments into
  configuration properties.
  
  @return the parsed main arguments as key/value pairs.