Print the option usage list for the command.

@param out The output stream.
@param name The sub-command to print help for.
@param showHidden If hidden sub-commands should be shown.
504034
public void printUsage(OutputStream out, String name, boolean showHidden) {
        printUsage(new PrintWriter(new OutputStreamWriter(out, UTF_8)), name, showHidden);
    }
500565
public void usage(@Nullable String programName, @Nullable String groupName, String commandName, CommandMetadata command)
    {
        StringBuilder stringBuilder = new StringBuilder();
        usage(programName, groupName, commandName, command, stringBuilder);
        System.out.println(stringBuilder.toString());
    }
721953
public void setShow(String name, boolean show) {
        String newName = name.toLowerCase();
        if (aclList.containsKey(newName)) {
            AccountACLValue value = aclList.get(newName);
            set(newName, value.canDeposit(), value.canWithdraw(), value.canAcl(), show, value.isOwner());
        } else {
            set(newName, false, false, false, show, false);
        }
    }
1084255
private boolean hidden(String className) {
	className = removeTemplate(className);
	ClassInfo ci = classnames.get(className);
	return ci != null ? ci.hidden : optionProvider.getOptionsFor(className).matchesHideExpression(className);
    }
1107176
private void printValue(String name, String value) {

		this.out.println(
				"  " + SimpleAnsi.INTENSITY_BOLD + name
				+ SimpleAnsi.INTENSITY_NORMAL
				+ spaces( PAD - name.length())
				+ "   " + value );
	}
736880
public String getSingleLineUsage(String name) {
        for (SubCommand<SubCommandDef> cmd : subCommands) {
            if (name.equals(cmd.getName())) {
                return cmd.getArgumentParser(cmd.newInstance()).getSingleLineUsage();
            }
        }
        throw new ArgumentException("No such " + getName() + " " + name);
    }
792928
public void showHelp() {
      System.err.println(applicationDescription);
      System.err.println("===============================================");

      Map<NamedOption, String> optionNames = new HashMap<>();
      optionSet.forEach(option -> {
         String out = Stream.concat(
            Stream.of(option.getAliasSpecifications()),
            Stream.of(option.getSpecification()))
                            .sorted((s1, s2) -> Integer.compare(s1.length(), s2.length()))
                            .collect(Collectors.joining(", "));
         if (option.isRequired()) {
            out += " *";
         }
         optionNames.put(option, out);
      });

      int maxArgName = optionNames.values().stream().mapToInt(String::length).max().orElse(10);

      optionNames.entrySet().stream()
                 .sorted(Map.Entry.comparingByValue())
                 .forEach(entry -> {
                    String arg = entry.getValue();
                    boolean insertSpace = !arg.startsWith("--");
                    if (insertSpace) {
                       System.err.print(" ");
                    }
                    System.err.printf("%1$-" + maxArgName + "s\t", arg);
                    System.err.println(entry.getKey().getDescription());
                 });

      System.err.println("===============================================");
      System.err.println("* = Required");

   }
948074
public void printCommandInfo(CommandInfo info) {
        final PrintContext context = new PrintContext();

        // Print command name : description
        final CliCommand command = info.getCommand();
        printIdentifiable(context, command);

        // Print bound params.
        final BoundParams boundParams = info.getBoundParams();
        printBoundParams(context, command, boundParams);
    }
591834
public static void printHelp(final Options options) {
        Collection<Option> c = options.getOptions();
        System.out.println("Command line options are:");
        int longestLongOption = 0;
        for (Option op : c) {
            if (op.getLongOpt().length() > longestLongOption) {
                longestLongOption = op.getLongOpt().length();
            }
        }

        longestLongOption += 2;
        String spaces = StringUtils.repeat(" ", longestLongOption);

        for (Option op : c) {
            System.out.print("\t-" + op.getOpt() + " --" + op.getLongOpt());
            if (op.getLongOpt().length() < spaces.length()) {
                System.out.print(spaces.substring(op.getLongOpt().length()));
            } else {
                System.out.print(" ");
            }
            System.out.println(op.getDescription());
        }
    }
360552
def print_help(self):
        

        print('\n  %s %s' % (self._title or self._name, self._version or ''))

        if self._usage:
            print('\n  %s' % self._usage)
        else:
            cmd = self._name
            if hasattr(self, '_parent') and isinstance(self._parent, Command):
                cmd = '%s %s' % (self._parent._name, cmd)

            if self._command_list:
                usage = 'Usage: %s <command> [option]' % cmd
            else:
                usage = 'Usage: %s [option]' % cmd

            pos = ' '.join(['<%s>' % name for name in self._positional_list])
            print('\n  %s %s' % (usage, pos))

        arglen = max(len(o.name) for o in self._option_list)
        arglen += 2

        self.print_title('\n  Options:\n')
        for o in self._option_list:
            print('    %s %s' % (_pad(o.name, arglen), o.description or ''))
        print('')

        if self._command_list:
            self.print_title('  Commands:\n')
            for cmd in self._command_list:
                if isinstance(cmd, Command):
                    name = _pad(cmd._name, arglen)
                    desc = cmd._description or ''
                    print('    %s %s' % (_pad(name, arglen), desc))

            print('')

        if self._help_footer:
            print(self._help_footer)
            print('')

        return self
231310
public void printUsage (@Nonnull final PrintWriter aPW, final int nWidth, final String sCmdLineSyntax)
  {
    final int nArgPos = sCmdLineSyntax.indexOf (' ') + 1;

    printWrapped (aPW, nWidth, getSyntaxPrefix ().length () + nArgPos, getSyntaxPrefix () + sCmdLineSyntax);
  }
826555
public static void printUsage(PrintWriter out) {
        CliArguments arguments = new CliArguments();
        CmdLineParser parser = new CmdLineParser(arguments);
        parser.setUsageWidth(120);
        parser.printUsage(out, null);
    }
220775
private boolean hidden(ProgramElementDoc c) {
	if (c.tags("hidden").length > 0 || c.tags("view").length > 0)
	    return true;
	Options opt = optionProvider.getOptionsFor(c instanceof ClassDoc ? (ClassDoc) c : c.containingClass());
	return opt.matchesHideExpression(c.toString()) //
		|| (opt.hidePrivateInner && c instanceof ClassDoc  && c.isPrivate() && ((ClassDoc) c).containingClass() != null);
    }
717401
public void printUsage(PrintWriter pw, int width, String app, Options options)
    {
        // initialise the string buffer
        StringBuffer buff = new StringBuffer(getSyntaxPrefix()).append(app).append(" ");

        // create a list for processed option groups
        Collection<OptionGroup> processedGroups = new ArrayList<OptionGroup>();

        List<Option> optList = new ArrayList<Option>(options.getOptions());
        if (getOptionComparator() != null)
        {
            Collections.sort(optList, getOptionComparator());
        }
        // iterate over the options
        for (Iterator<Option> it = optList.iterator(); it.hasNext();)
        {
            // get the next Option
            Option option = it.next();

            // check if the option is part of an OptionGroup
            OptionGroup group = options.getOptionGroup(option);

            // if the option is part of a group 
            if (group != null)
            {
                // and if the group has not already been processed
                if (!processedGroups.contains(group))
                {
                    // add the group to the processed list
                    processedGroups.add(group);


                    // add the usage clause
                    appendOptionGroup(buff, group);
                }

                // otherwise the option was displayed in the group
                // previously so ignore it.
            }

            // if the Option is not part of an OptionGroup
            else
            {
                appendOption(buff, option, option.isRequired());
            }

            if (it.hasNext())
            {
                buff.append(" ");
            }
        }


        // call printWrapped
        printWrapped(pw, width, buff.toString().indexOf(' ') + 1, buff.toString());
    }
899455
@Override
  public synchronized void write(DataOutput out) throws IOException {
    Text.writeString(out, name);
    boolean distinctDisplayName = ! name.equals(displayName);
    out.writeBoolean(distinctDisplayName);
    if (distinctDisplayName) {
      Text.writeString(out, displayName);
    }
    WritableUtils.writeVLong(out, value);
  }
1351725
private static void printCustomCliOptions(
			Collection<CustomCommandLine<?>> customCommandLines,
			HelpFormatter formatter,
			boolean runOptions) {
		// prints options from all available command-line classes
		for (CustomCommandLine cli: customCommandLines) {
			formatter.setSyntaxPrefix("  Options for " + cli.getId() + " mode:");
			Options customOpts = new Options();
			cli.addGeneralOptions(customOpts);
			if (runOptions) {
				cli.addRunOptions(customOpts);
			}
			formatter.printHelp(" ", customOpts);
			System.out.println();
		}
	}
337939
public void printUsage() {
        String name = mainClass == null ? "<MainClass>" : mainClass.getName();
        String usage = "java " + name + " [OPTIONS]";
        final HelpFormatter formatter = new HelpFormatter();
        formatter.setWidth(120);
        formatter.printHelp(usage, options, true);
    }