code: private static String shellifyName(String name)
     {
        String newName = WHITESPACES.matcher(name.trim()).replaceAll("-");
        // /FORGE-2690: Special case when command name ends with -
        if (newName.endsWith("-"))
        {
           newName = newName.substring(0, newName.length() - 1);
        }
        return COLONS.matcher(newName).replaceAll("");
     }
docs: "Shellifies" a name (that is, makes the name shell-friendly) by replacing spaces with "-" and removing colons
  
  @param name
  @return