private String getCommandPart(String userInput) {
    int parms = userInput.indexOf(" --");
    return (parms < 0 ? userInput : userInput.substring(0, parms)).trim();
  }
get mini-help for commands entered without all required parameters

@return null if unable to identify anything missing
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/help/Helper.java