public String formatCommand(String command) {
    if (!containsOption(command)) {
      return command;
    }
    formatted = new StringBuilder();

    List<String> strings = split(command);
    for (String string : strings) {
      if (string.contains(EQUAL_HYPHEN)) {
        int indexOfEquals = string.indexOf(EQUAL);
        formatted.append(string, 0, indexOfEquals + 1);
        formatted.append(QUOTE);
        formatted.append(string.substring(indexOfEquals + 1));
        formatted.append(QUOTE);
      } else {
        formatted.append(string);
      }
      formatted.append(SPACE);
    }
    return formatted.toString().trim();
  }
Returns command with quotes around the values of any option values that begin with hyphen.
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/util/HyphenFormatter.java